One of my DAGs with many steps stopped part way through because of a DB shutdown. I'd like to get the DAG to start where it left off but all I can do is start the individual tasks of the DAG one by one. Is there a way to tell Airflow to start the DAG where it left off based on the success of the tasks already completed?
Here's a sample where one of the first tasks finished and the rest are queued or have no status:
When I click on an individual task (runme_1
) I can restart it:
However, if I try to start a task which hasn't had it dependencies met (such as run_after_loop
), I see the following error message:
I'd like to be able to click on any task, ask it to be queued and have all dependencies run in the correct order. Is that possible?
I'm running Airflow 1.9.0.
Finally, if you want to clear a full DAG run (all tasks in that DAG), go to the Tree View in the UI, click on the DAG circle and select 'Clear'.
Click on the "select all" checkbox at the top of the list to select all of the queued tasks. Now, in the "Actions" menu, select "Clear" and apply it to all of the queued tasks. Confirm your choice to Clear the queued tasks. Airflow should immediately prepare to run the queued tasks.
It sounds like you need to start a dag from the task where it failed.
Instead of going into the DAG and clicking on a task and clicking run, go to the Dag run with the failed task, click the failed task and click clear.
Clearing the task will re-run the task, and any other tasks after it will run.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With