Drop a downstream or upstream task dependency in Airflow #29352
-
Assuming we have the two following Airflow tasks in a DAG,
we can specify dependencies as:
My question is whether there is any functionality that lets you remove downstream and/or upstream dependencies once they are defined. I have a fairly big DAG where most of the tasks (and their dependencies) are generated dynamically. Once the tasks are created, I would like to re-arrange some of the dependencies and/or introduce some new tasks. For example, assuming that the functionality implements the following logic
I would like to then be able to add a new task, add it in between the two tasks, and then remove the old dependency between
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I am not sure if this works, but you can try it: t1.downstream_task_ids.pop("dummy_2")
t2.upstream_task_ids.pop("dummy_1") |
Beta Was this translation helpful? Give feedback.
I am not sure if this works, but you can try it: