4

I have 3 dags A, B and C. Dag C should get triggered only after tasks in dag A and B completes. Is there a way to implement this in airflow? I am able to set dependency between dag A and C using Triggerdagrun Operator. But when I try to set dependency between dag B and C, C is getting triggered when either A or B completes. Can someone please help me in solving this? I understand that explains external task sensor Operator can be used. But it continuously polls if task in dag A and B is complete which might create performance hit over a period of time.

Rohini
  • 41
  • 1
  • 4
  • https://stackoverflow.com/questions/38022323/how-to-set-dependencies-between-dags-in-airflow/38028511 – D_usv Jan 08 '18 at 10:29

2 Answers2

0

You could set two more wait-task in your dagc,

then startop >> [wait-daga, wait-dagb] >> dagc.

Below is the link to airflow doc: https://airflow.apache.org/docs/stable/concepts.html

Duke Xu
  • 26
  • 2
0

The Question is about cross DaG dependency. Here the Solution is to use ExternalTaskSensors.

https://airflow.apache.org/docs/apache-airflow/1.10.3/_api/airflow/sensors/external_task_sensor/index.html