Airflow Catchup
Which historical runs should exist?
Airflow catchup is a DAG scheduling policy for missing historical runs. For a data-interval timetable, catchup=True lets the scheduler work through eligible intervals from the start boundary. catchup=False skips the backlog and selects the latest eligible interval. The exact selection depends on the timetable and existing runs; catchup is not an instruction to rerun every successful task.
A daily example
Consider a UTC daily CronDataIntervalTimetable starting on October 1, 2024, with no existing runs, first enabled at noon on October 4. With catchup=True, the October 1โ2, 2โ3, and 3โ4 intervals are eligible. With catchup=False, only October 3โ4 is selected initially. October 4โ5 is still open. These are interval choices, not promises that workers start immediately or that all runs execute together.
Catchup, retry, and backfill
A retry repeats an attempt for a task instance after failure. A backfill explicitly requests a historical range with a reprocessing policy. Turning catchup off does not prohibit a backfill. In Airflow 3.1.0, a backfill has its own max_active_runs setting, independent of the DAG setting. Review both before launching historical work.
What this policy cannot restore
Suppose a missed October 1 run reads a source table that now contains only current balances. Creating the missing run does not recover October 1 balances. Keep historical input versions and filter using the assigned interval. Repeated destination writes also need their own identity and conflict rules. A missing run, a failed task, and missing source data are different problems.
Worked example: Apache Airflow Fundamentals: DAGs, Tasks, and Scheduling.
Further reading
Discover more from Insightful Data Lab
Subscribe to get the latest posts sent to your email.
