Last active
August 12, 2016 02:59
-
-
Save lxneng/ebf019b27be90f38e443baafc5ceeaa7 to your computer and use it in GitHub Desktop.
cleanup dag info by sql in postgres db
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
\set dag_id '''dag002'''; | |
delete from xcom where dag_id = :dag_id; | |
delete from task_instance where dag_id = :dag_id; | |
delete from sla_miss where dag_id = :dag_id; | |
delete from log where dag_id = :dag_id; | |
delete from job where dag_id = :dag_id; | |
delete from dag_run where dag_id = :dag_id; | |
delete from dag where dag_id = :dag_id; |
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
airflow=# \i ~/sqls/cleanup_dag002.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment