Search code examples
airflowairflow-scheduler

How to pause / Un pause multiple dags in airflow


We have 100 of dags which has a prefix with "dag_EDW_HC_*" . we have below command to pause the dag

Command: airflow pause dag_id

Is there any way we can pause all the 100 dags "dag_EDW_HC_*" in a single go .. (In programmatic in python or any other way) ..?


Solution

  • The absolute easiest (and likely fastest) way I can think of is to update the database:

    UPDATE  dag
       SET  is_paused = false
     WHERE  dag_id LIKE 'dag_EDW_HC%';