Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. How do you define task dependencies?

Airflow & DAGs · Core Concepts & DAGs

How do you define task dependencies?

Easyairflow-05
dependenciesbitshift

Question

How do you define task dependencies in Airflow?

Solution

task_a >> task_b   # A must finish before B starts
task_a << task_b   # B must finish before A

Example:

extract >> transform >> load
extract → transform → load

You can also write:

extract.set_downstream(transform)

Fan-out / fan-in:

extract >> [validate, enrich] >> load
PreviousNext