Airflow
20 in-depth lessons. Run pipelines on a schedule with Apache Airflow 3: DAG files, schedules and catchup, templates and idempotent reruns, retries and trigger rules, branching, XCom, sensors, dynamic tasks and task groups. Every example shows what the scheduler does with it.
Bronze
Module 1: Orchestration basics
Explain what Airflow does, read a DAG file, and run one on your laptop.
- What Airflow is (and is not) · Bronze · 5 min read. An orchestrator: what it schedules, retries and records, how it differs from cron, and what Airflow 3 is made of.
- A DAG file, line by line · Bronze · 5 min read. The DAG, its tasks and dependencies, and why the file runs every time it is parsed.
- Running Airflow 3 on your laptop · Bronze · 5 min read. airflow standalone, the dags folder, the UI, and testing a DAG with airflow dags test.
Module 2: Schedules
Predict which runs a schedule creates, and backfill history one day at a time.
- Schedules and logical dates · Bronze · 5 min read. Cron strings, presets and timetables, and what a run's logical date means in Airflow 3.
- Catchup, backfill and end_date · Bronze · 5 min read. Which runs a late deploy creates, filling history on purpose, and limiting runs in flight.
Module 3: Tasks
Pick the right operator, and write tasks that redo the same day when rerun.
- Operators and TaskFlow · Bronze · 5 min read. BashOperator, PythonOperator and @task: when to use which, and where providers come in.
- Templates and idempotent reruns · Bronze · 5 min read. Jinja in task arguments, the context Airflow 3 provides, macros, and reruns that redo the same day.
Silver
Module 4: Failures
Retry what can recover, fail fast on what cannot, and clean up without hiding failures.
- Retries, timeouts and callbacks · Silver · 5 min read. Which failures to retry, how retry_delay and backoff space them, timeouts, and failing fast.
- Trigger rules and run state · Silver · 5 min read. When a task runs after its upstream tasks fail or skip, and how a run gets its final state.
Module 5: Control flow
Branch, pass small results between tasks, and wait for data without wasting workers.
- Branching and short-circuiting · Silver · 4 min read. Choose a path at run time, skip the rest, and join the branches back together.
- XCom: passing data between tasks · Silver · 4 min read. Return values, TaskFlow arguments and xcom_pull, and what should never go through XCom.
- Sensors and deferrable operators · Silver · 5 min read. Wait for a file, a partition or another DAG without blocking a worker slot.
Module 6: Scaling a DAG
Fan out over inputs known only at run time, and keep big DAGs readable.
- Dynamic task mapping · Silver · 4 min read. One task per file, table or customer, decided at run time with expand().
- Task groups, setup and teardown · Silver · 5 min read. Organise a large DAG into groups, and pair resources with their clean-up.
Gold
Module 7: Data-aware pipelines
Schedule on data updates, and write pipelines that reruns and backfills cannot corrupt.
- Assets: scheduling on data · Gold · 5 min read. Start a DAG when the data it needs has been updated, instead of at a guessed time.
- Idempotent pipelines with Spark and Delta · Gold · 5 min read. Jobs that a retry, rerun or backfill cannot corrupt, and chains of days that stop at a failure.
Module 8: Running Airflow in production
Control concurrency, explain the architecture, test and deploy DAGs, and upgrade to Airflow 3.
- Pools, concurrency and priority · Gold · 5 min read. Every limit on how many tasks run at once, pools for shared systems, and who goes first.
- Airflow 3 architecture in production · Gold · 4 min read. The life of a task instance, executors, DAG bundles and versions, and what production needs.
- Testing DAGs and CI/CD · Gold · 4 min read. Import, policy, unit and end-to-end tests, and a deploy pipeline for DAG repositories.
- Migrating from Airflow 2 to 3 · Gold · 5 min read. What breaks, what still works with a warning, and what changes without any error.