Apache Airflow Dependencies, what if task are parallel?

1.8k views Asked by At

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 ?

1

There are 1 answers

0
gruby On BEST ANSWER

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