Skip to content

9. One Export at a Time

Difficulty: Medium · Topic: Ordering & concurrency

The DAG partner_export runs @daily from 2026-02-01 to 2026-02-04 with catchup=True. It has two BashOperator tasks, prepare (prepare --date {{ ds }}) then export (export --date {{ ds }}).

When the DAG is deployed late, all four days run together. That is fine for prepare, but the partner's API accepts only one export at a time:

Your DAG file is run in a simulation of the Airflow 3 scheduler against 3 scenarios, including hidden ones.

Sample scenario: A late deploy

Deployed 2026-02-10 00:30 UTC, read at 2026-02-10 02:00 UTC.

Expected runs

Hints

Hint 1max_active_runs limits whole runs, which would hold back prepare as well.
Hint 2A task can have its own limit across all of the DAG's runs: max_active_tis_per_dag.
Hint 3depends_on_past also makes exports run one by one, but a failure would stop the later days.

Learn the concepts

More Airflow problems

All Airflow problems · Learn Airflow