I know there is a way to delete a DAG. But is it possible to delete a DAG run with a specific run_id? Something like:
airflow delete_dag_run <dag_id> <run_id>
I know there is a way to delete a DAG. But is it possible to delete a DAG run with a specific run_id? Something like:
airflow delete_dag_run <dag_id> <run_id>
To delete a DAG Run from the Airflow UI:
Browse > "DAG Runs"
."With selected" > Delete
.You can also delete the "DAG Runs" from airflow database:
DELETE FROM dag_run
WHERE dag_id='my_dag_id' AND
state='STATE_I_WANT_TO_DELETE'
Its better to use CLI to remove the logs details. For example, lets say, we have a dag with dag_id = 'DAG_ID', then to remove its all metadata records i.e., old jobs run details, execute below command via CLI
airflow dags delete 'DAG_ID'
also, to remove all dags meta data at once, execute below command
airflow db reset
© 2022 - 2024 — McMap. All rights reserved.