Fedeco
Fedeco

Reputation: 876

Apache Airflow Dependencies, what if task are parallel?


Let's say that we have 3 task `A,B,C` that are executed in order `A>>B>>C`.
I'm using Apache Airflow and creating a DAG that will use these 3 tasks.

I would have to write (where task A is ta, task B is tb, task C is tc) :

ta>>tb>>tc

But what if after A it would go to B and C that are 2 parallel tasks ?
How would I have to write the dependencies ?

Upvotes: 0

Views: 2087

Answers (1)

gruby
gruby

Reputation: 990

The simplest way to do this is as below

ta >> tb
ta >> tc

or

ta >> [tb, tc] 

This will make B & C parallel after A

More info can found here: https://airflow.apache.org/docs/stable/concepts.html#bitshift-composition

Upvotes: 5

Related Questions