Deleting a DAG on an Airflow Cluster

You can delete a DAG on an Airflow Cluster from the Airflow Web Server.

Required Permissions

To delete a DAG on an Airflow cluster, you require Delete access on the Object Storage and Update Permission on the Airflow cluster. For more information on the DAG explorer permissions, see Managing DAG Explorer Permissions.

Deleting a DAG on an Airflow Cluster from Airflow Web Server

Before you delete a DAG, you must ensure that the DAG must be either in the Off state or does not have any active DAG runs. If the DAG has any active runs pending, then you should mark all tasks under those DAG runs as completed.

Follow the instructions to delete a DAG on an Airflow cluter from the Airflow Web Server:

  1. From the Clusters page, click on the Resources drop-down list against the airflow cluster, and select Airflow Web Server. The Airflow Web Server is displayed as shown in the illustration.
../../../_images/delete-dag1.png
  1. Click DAGs tab to view the list of DAGs.
  2. Click on the delete button under the Links column against the required DAG.
  3. Click OK to confirm.

By default, it takes 5 minutes for the deleted DAG to disappear from the UI. You can modify this time limit by configuring the scheduler.dag_dir_list_interval setting in the airflow.cfg file. This time limit does not work on sub-DAG operators.

Note

It is recommended not to decrease the time limit value substantially because it might lead to high CPU usage.