Orchestration · Knowledge Base

Apache Airflow

From your first DAG to running thousands of them. Scheduling semantics that trip everyone up, authoring patterns that survive review, the concurrency and executor decisions that decide whether Airflow scales — and the production failures worth knowing before you meet them.

20 chapters3 levelszero → advanced
Start
01

Foundations

5 chapters
02

Authoring DAGs

8 chapters
06

Operators, Sensors & Hooks In Depth

Core and provider operators, poke vs reschedule sensors, hooks and connection reuse, and how to write a custom operator that is worth writing.

Provider packagesSensorsHooksCustom operatorsParse-time args
Read chapter →
07

TaskFlow API & Modern DAG Authoring

The @task decorator, dependencies inferred from function calls, and an honest account of when classic operators are still the better answer.

@taskImplicit deps@task.dockerMixing stylesRefactoring
Read chapter →
08

XComs, Templating & Jinja

Why XCom is metadata and not data, the pass-a-pointer pattern, and every template macro rendered against a concrete logical date.

XCom limitsCustom backendsJinja macrostemplate_fieldsRender time
Read chapter →
09

Connections, Variables & Secrets Management

The connection model, secrets backends, and the single Variable.get() call in top-level code that can bring a scheduler to its knees.

ConnectionsVariablesSecrets backendsEnv configRotation
Read chapter →
10

Dynamic DAGs & Dynamic Task Mapping

Generating DAGs from config, .expand() and .partial() fan-out, and the point where dynamic generation stops being clever and starts being unmaintainable.

DAG factoriesexpand / partialMap indexesParse costLimits
Read chapter →
11

Branching, Trigger Rules & Task Groups

Why the join task after a branch silently never runs, every trigger rule in one place, and TaskGroups for DAGs people can actually read.

@task.branchSkip propagationTrigger rulesTaskGroupsSetup/teardown
Read chapter →
12

Backfills, Catchup, Retries & Deadlines

Running a backfill without flooding the source system, retry and timeout settings that behave, and the Deadline Alerts that replaced SLAs in Airflow 3.

Catchupmax_active_runsBackoffTimeoutsCallbacks
Read chapter →
13

Idempotency & Safe Task Design

Retries, backfills and clears all mean your task will run twice. Partition overwrite, MERGE, atomic swaps — and how to prove a task is safe.

Re-runnable tasksPartition overwriteMERGEAtomic writesGranularity
Read chapter →
03

Scale & Production

7 chapters
14

Executors Compared: Local, Celery, Kubernetes

How each executor actually runs a task, what it costs, and a decision framework that starts from your workload shape rather than fashion.

LocalExecutorCelery queuesKubernetesExecutorCold startsSizing
Read chapter →
15

Concurrency, Pools, Priorities & Deferrable Operators

The full concurrency ladder, pools that protect your warehouse, and converting idle sensors into deferrable tasks that free their worker slot.

parallelismPoolspriority_weightTriggererStarvation
Read chapter →
16

Assets & Cross-DAG Data-Aware Scheduling

Assets (renamed from Datasets in Airflow 3), producer/consumer DAGs, and the same cross-DAG dependency solved three ways so you can pick on evidence.

AssetsData-aware runsExternalTaskSensorTriggerDagRunDAG boundaries
Read chapter →
17

Running External Compute: Spark, Docker & Kubernetes Pods

Airflow triggers work; it is not a compute engine. Submitting to Spark, EMR and Databricks, KubernetesPodOperator, and dependency isolation.

SparkSubmitKubernetesPodOperatorDockerOperatorIsolationRemote logs
Read chapter →
18

Testing DAGs & CI/CD Deployment

DAG integrity tests that catch a broken deploy, unit-testing logic outside operators, and how DAG code actually reaches production.

Integrity testsdag.test()Mocking hooksgit-syncPromotion
Read chapter →
19

Monitoring, Logging, Alerting & Production Failures

Remote logging, the metrics that actually predict incidents, zombie tasks, and a symptom → diagnosis → fix table you can use on call.

Remote logsCallbacksScheduler lagZombie tasksRunbook
Read chapter →
20

Managed Airflow, Airflow 3 & Migration

MWAA vs Composer vs Astronomer vs self-hosted, what Airflow 3 changed, and the deprecations that still bite when you follow an old tutorial.

MWAAComposerAirflow 3DAG versioningUpgrade path
Read chapter →