气流:如何删除DAG?

编程入门 行业动态 更新时间:2024-10-27 12:29:40
本文介绍了气流:如何删除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上发布!

pypi/ 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 = github/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" 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?

本文发布于:2023-11-23 17:39:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622323.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:气流   DAG

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!