Created
August 22, 2017 18:21
-
-
Save kdeloach/212de005ec5301702220decd6d29aa5d to your computer and use it in GitHub Desktop.
Delete Airflow DAG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dag_id=$1 | |
psql -c "delete from xcom where dag_id='$dag_id'" | |
psql -c "delete from task_instance where dag_id='$dag_id'" | |
psql -c "delete from sla_miss where dag_id='$dag_id'" | |
psql -c "delete from log where dag_id='$dag_id'" | |
psql -c "delete from job where dag_id='$dag_id'" | |
psql -c "delete from dag_run where dag_id='$dag_id'" | |
psql -c "delete from dag where dag_id='$dag_id'" | |
psql -c "delete from task_fail where dag_id='$dag_id'" | |
psql -c "delete from dag_stats where dag_id='$dag_id'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment