气流:如何删除DAG? [英] Airflow: how to delete a DAG?

查看:154
本文介绍了气流:如何删除DAG?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经启动了Airflow网络服务器,并安排了一些调试工作。我可以在Web GUI上看到这些问题。

I have started the Airflow webserver and scheduled some dags. I can see the dags on web GUI.

如何删除正在运行并显示在Web GUI中的特定DAG?

How can I delete a particular DAG from being run and shown in web GUI? Is there an Airflow CLI command to do that?

我环顾四周,但找不到加载DAG并计划好删除DAG的简单方法的答案。

I looked around but could not find an answer for a simple way of deleting a DAG once it has been loaded and scheduled.

推荐答案

编辑8/27/18-Airflow 1.10现在已在PyPI上发布!

https://pypi.org/ project / apache-airflow / 1.10.0 /

我们现在在Airflow≥1.10中具有此功能!

We have this feature now in Airflow ≥ 1.10!

PR #2199 (吉拉: AIRFLOW-1002 )现在已合并到Airflow中添加了DAG删除功能,从而可以从所有相关表中完全删除DAG的条目。

The PR #2199 (Jira: AIRFLOW-1002) adding DAG removal to Airflow has now been merged which allows fully deleting a DAG's entries from all of the related tables.

核心 delete_dag(...)代码现在是实验性API的一部分,并且有可用的入口点href = https://github.com/apache/incubator-airflow/blob/9dba430b683361fc0ed7f50de6daa03c971a476b/airflow/bin/cli.py#L214-L232 rel = noreferrer>通过CLI 以及通过REST API

The core delete_dag(...) code is now part of the experimental API, and there are entrypoints available via the CLI and also via the REST API.

CLI:

airflow delete_dag my_dag_id

REST API(本地运行网络服务器):

REST API (running webserver locally):

curl -X "DELETE" http://127.0.0.1:8080/api/experimental/dags/my_dag_id






关于REST API的警告:确保您的Airflow集群在生产中使用身份验证


Warning regarding the REST API: Ensure that your Airflow cluster uses authentication in production.

要升级,请运行:

export SLUGIFY_USES_TEXT_UNIDECODE=yes

或:

export AIRFLOW_GPL_UNIDECODE=yes

然后:

pip install -U apache-airflow

记住要检查 UPDATING.md 首先了解全部细节!

Remember to check UPDATING.md first for the full details!

这篇关于气流:如何删除DAG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆