Data Engineering: Pipelines, Orchestration & Reliability
Back to Ingestion and Orchestration

Airflow in Production — Scheduling, Backfills & Retries

Three concepts that separate amateur pipelines from production-grade ones. FIND_VIDEO: search 'data pipeline backfill idempotent design' — recommended channel: Seattle Data Guy / Kahan Data Solutions. Aim for 10 min or under.

23 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.
Loading progress...

Key moments

  1. Backfilling Core Concepts — Introduces backfilling as the process of running DAGs or tasks for past, untriggered, or failed intervals.
  2. Backfill Scenarios and Use Cases — Outlines key scenarios requiring backfills including new pipelines, failure handling, logic changes, and selective reruns.
  3. CLI Backfill Tooling — Explains that backfilling is officially executed via the Airflow CLI rather than through the web interface.
  4. Scheduler Catchup Mechanism — Demonstrates enabling catchup=True on a DAG to auto-generate historical runs between start_date and current time.
  5. Date-Bounded CLI Backfills — Executes a CLI backfill using start and end date flags and verifies the Backfill run type indicator in the UI.
  6. Diagnosing Failed Intervals — Identifies failed historical date windows using the Dag Runs table and the Calendar View in the web UI.
  7. Task Retries and Try Numbers — Explains Try Number tracking and shows how standard backfills fail to rerun previously failed tasks.
  8. Rerunning Failed Tasks — Applies the rerun-failed-tasks flag to force a single rerun attempt on failed tasks within the date window.
  9. Resetting DAG Run States — Combines reset-dag-runs with rerun-failed-tasks to reset execution state and enforce full configured task retries.
  10. Disabling Automatic Retries — Introduces the disable-retry flag to bypass task retry delays and optimize backfill execution speed.
PDF notes

Frequently asked questions

Can I trigger a backfill operation directly from the Airflow web UI?

No, official Airflow backfill operations must be executed exclusively through the Command Line Interface (CLI).

What is the difference between catchup=True and a CLI backfill?

Setting catchup=True prompts the scheduler to run all missing intervals since start_date upon unpausing, whereas CLI backfilling manually runs any user-defined date window.

Why does --rerun-failed-tasks only retry my failing task once despite retries=15?

The --rerun-failed-tasks flag only triggers a single attempt; you must also pass --reset-dag-runs to restore the DAG run state and full retry policy.

How can I locate the exact date bounds of failed runs to backfill?

Inspect the Dag Runs list or use the Calendar View in the Airflow UI to find the start and end dates of failed executions.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.