[ 
https://issues.apache.org/jira/browse/AIRFLOW-1002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16359479#comment-16359479
 ] 

ASF subversion and git services commented on AIRFLOW-1002:
----------------------------------------------------------

Commit 7488f2938da4e08645060531aa363204db7f50a5 in incubator-airflow's branch 
refs/heads/master from [~sekikn]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=7488f29 ]

[AIRFLOW-1002] Add ability to clean all dependencies of removed DAG

After removing a dag file, there is no way to
clean database
except for removing corresponding records directly
for now.
This PR enables user to do this via command line.

Closes #2199 from sekikn/AIRFLOW-1002


> Add ability to remove DAG and all dependencies 
> -----------------------------------------------
>
>                 Key: AIRFLOW-1002
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1002
>             Project: Apache Airflow
>          Issue Type: New Feature
>          Components: core, DAG
>    Affects Versions: Airflow 2.0, Airflow 1.8
>            Reporter: Ruslan Dautkhanov
>            Assignee: Kengo Seki
>            Priority: Major
>             Fix For: 2.0.0
>
>
> I don't see an obvious way to remove a DAG with dependencies
> Looks like folks have custom scripts to clean up backend database directly.
> http://stackoverflow.com/questions/40651783/airflow-how-to-delete-a-dag
> https://groups.google.com/forum/#!topic/airbnb_airflow/GVsNsUxPRC0
> It would be nice to have a feature to remove a DAG directly in UI / through 
> API.
> {code}
> queries = {'delete from xcom where dag_id = "' + dag_input + '"',
>         'delete from task_instance where dag_id = "' + dag_input + '"',
>         'delete from sla_miss where dag_id = "' + dag_input + '"',
>         'delete from log where dag_id = "' + dag_input + '"',
>         'delete from job where dag_id = "' + dag_input + '"',
>         'delete from dag_run where dag_id = "' + dag_input + '"',
>         'delete from dag where dag_id = "' + dag_input + '"' }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to