This is for the data model as of March 2016. I haven't tried it lately.
Wrap in a transaction.

For MySQL:

set @dag_id = 'BAD_DAG';
delete from airflow.xcom where dag_id = @dag_id;
delete from airflow.task_instance where dag_id = @dag_id;
delete from airflow.sla_miss where dag_id = @dag_id;
delete from airflow.log where dag_id = @dag_id;
delete from airflow.job where dag_id = @dag_id;
delete from airflow.dag_run where dag_id = @dag_id;
delete from airflow.dag where dag_id = @dag_id;


On Thu, Aug 25, 2016 at 8:57 PM, Vince Reuter <[email protected]>
wrote:

> Hey Jason, I think it's an open PR https://github.com/apache/
> incubator-airflow/pull/1344
>
> -Vince
>
> > On Aug 25, 2016, at 8:35 PM, Jason Chen <[email protected]>
> wrote:
> >
> > Hi,
> >
> > How to delete a dag in airflow (instead of turning it off ) ?
> >
> > Thanks.
> >
> > Jason
>



-- 
Lance Norskog
[email protected]
Redwood City, CA

Reply via email to