On Thu, Jul 13, 2017 at 2:25 PM Andrew Maguire <[email protected]> wrote:
> It could be that you need to remove it from the database aswell - think i > recall reading that somewhere. > > Here is a script that takes in a dag name and deletes it from the database > - has been working for me. But not sure if this a recommended practice or > anything. > > https://github.com/andrewm4894/airflow-examples/blob/master/delete_dag.py > > > On Wed, Jul 12, 2017 at 10:33 PM manish ranjan <[email protected]> > wrote: > >> Hi All, >> >> I have had a DAG, which I needed to clean up from UI (airflow version >> v1.7.1.3) >> >> Following this Jira <https://issues.apache.org/jira/browse/AIRFLOW-1002> >> I >> deleted manually from all the tables >> 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 + '"' } >> >> But the dag from airflow UI just won't go away :( Is there something basic >> I am missing? >> >> PS: I also saw that you guys have merged this PR >> <https://github.com/apache/incubator-airflow/pull/2199> just a few days >> back so we will be able to do this from CLI. Thanks for that. But how can >> I >> do this today? >> >> ~Manish >> >
