Deleting a DAG on an Airflow Cluster

You can delete a DAG on an Airflow Cluster from the Qubole UI and 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.

Deleting a DAG on an Airflow Cluster from Qubole UI

Follow the instructions to delete a DAG on an Airflow cluter from the Qubole UI:

  1. Navigate to the Clusters page on the Qubole UI and click an Airflow cluster that is up and running. The cluster details page appears.
  2. On the cluster details page, click DAG Explorer tab.
  3. Click dags to expand the DAG list. You can view a delete icon next to every DAG in list.
../../../_images/delete_dag_1.gif
  1. Click the delete icon next to the DAG to delete it and a pop-up window appears to seek for confirmation.
  2. Click OK. You have successfully deleted the DAG.