Reputation: 3865
I have three task in one dag.
Task A run first. Task B runs if task A is successful.
I have Task C which has run after Task B but it is not depend up Task B or Task A success or failure.
Task C needs to no matter what happen to task A and B. However, it needs to run after task A and B is completed.
Any idea ?
Upvotes: 3
Views: 1393
Reputation: 819
To have a task run after other tasks are done, but regardless of the outcome of their execution, set the trigger_rule
parameter to all_done
like so:
my_task = MyOperator(task_id='my_task',
trigger_rule='all_done'
See the trigger rule documentation for more options
Upvotes: 7