Task dependencies

Hi,
I’m using airflow 2.0 and trying to create a simple DAG with few tasks.
My goal is that the second task and so on will run only if the first if the first task’s function will return True. If the first task’s function will return False, I want the DAG will stop running after the first task.
How could I create this dependency between the tasks?

Thx.

Hey there,

ShortCiruitOperator is an extended version of PythonOperator which will serve your purpose of running the downstream task only if the upstream tasks returns a truth value.

1 Like