Skip to content

8. Two Regions, One Publish

Difficulty: Medium · Topic: Task groups

The DAG regional_sales runs @daily from 2026-01-01 (no catchup). Two regions run the same two steps, side by side:

The regions run at the same time and do not depend on each other: a failure in one must not stop the other. All tasks are BashOperators, so the ids are eu.extract, eu.load, us.extract, us.load and publish.

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

Sample scenario: Both regions finish

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

Expected runs

Hints

Hint 1Tasks made inside with TaskGroup(group_id="eu") as eu: get the id eu.extract, so the same task_id can be used in both groups.
Hint 2A group can be used in a dependency: [eu, us] >> publish connects the last tasks of each group to publish.
Hint 3A for loop over the regions saves writing each group by hand.

Learn the concepts

More Airflow problems

All Airflow problems · Learn Airflow