DataLane

All stacks · Orchestration

Airflow

Workflow orchestration: DAGs, scheduling, and operations.

Airflow cover

Related reading

About Airflow

Airflow remains the default orchestrator of the data world: DAGs as Python code, a mature scheduler, and an ecosystem of providers for every system you will ever touch. It is also famously easy to run badly — non-idempotent tasks, surprise backfills, and datetime.now() bugs have burned every team at least once.

The articles here focus on operating Airflow well: TaskFlow-first DAG design, the data interval model that everyone misunderstands at first, backfills that do not double-load, deferrable operators that stop burning worker slots, and the settings that matter before an on-call rotation depends on your scheduler.

What you'll learn here

  • TaskFlow API patterns and when classic operators still make sense
  • The scheduling model: data intervals, catchup, and why runs execute after the period ends
  • Idempotent task design so retries and backfills are safe by construction
  • Sensors vs deferrable operators, and pools, priorities, and concurrency limits
  • Testing DAGs locally and structuring repos for many teams

Frequently asked questions

Is Airflow still worth learning with Dagster and Prefect around?

Yes. Airflow has the largest install base by far, so it is the orchestrator you will most likely inherit at work. Dagster and Prefect have real design advantages — we compare them honestly — but Airflow experience remains the most transferable orchestration skill.

Why did my DAG run for yesterday, not today?

Airflow runs are stamped with the data interval they process, and a run executes after its interval closes. A daily run labeled Aug 1 executes at midnight on Aug 2, processing Aug 1 data. Use data_interval_start in your logic instead of the wall clock and this becomes a feature.

What is the single most important Airflow habit?

Idempotent tasks. Every task should produce the same result if run twice — DELETE+INSERT by partition or MERGE by key instead of blind INSERT. Once tasks are idempotent, retries, reruns, and backfills all become boring.

Should I run Airflow myself or use a managed service?

Managed (MWAA, Cloud Composer, Astronomer) unless you have platform engineers to spare. Self-hosting means owning the metadata database, scheduler tuning, and upgrades — undifferentiated toil for most teams.

How do I stop a new DAG from backfilling months of history?

Set catchup=False on the DAG. With catchup=True (the historical default behavior), Airflow schedules a run for every interval between start_date and now the moment you enable the DAG.

New Airflow posts, straight to your inbox

One email a week with our latest tutorials. No spam.

Newsletter signup is not live yet. Use the contact form if you want to be notified.

↑↓ navigate openesc close