backfill
Definition
Backfill is a sub-command in the dag command group. It allows you to run subsections of a DAG for a specified date range.
If reset_dag_run option is used, the command will first prompt whether Airflow should clear all the previous DAG runs and task instances within the provided date range.
If rerun_failed_tasks is used, Airflow will re-run the previous failed task instances within the provided date range.
Usage
$ airflow dags backfill [-h] [-c CONF] [--continue-on-failures]
[--delay-on-limit DELAY_ON_LIMIT] [--disable-retry] [-x]
[-n] [-e END_DATE] [-i] [-I] [-l] [-m] [--pool POOL]
[--rerun-failed-tasks] [--reset-dagruns] [-B]
[-s START_DATE] [-S SUBDIR] [-t TASK_REGEX]
[--treat-dag-as-regex] [--treat-dag-id-as-regex] [-v]
[-y]
dag_id
Arguments
| Parameter | Description |
|---|---|
dag_id |
The ID of the DAG to backfill |
-s, --start-date |
The start date of the backfill period in |
-e, --end-date |
The end date of the backfill period in |
-m, --mark-success |
Mark jobs as succeeded without running them |
-i, --ignore-dependencies |
Skip upstream tasks. Run only the tasks matching the regex |
-t, --task-regex |
Regex pattern to filter specific task IDs to backfill |
-I, --ignore-first-depends-on-past |
Ignore |
-l, --local |
Run the task using the LocalExecutor |
-x, --donot-pickle |
Do not pickle the DAG object to send to workers. Workers will run their version of the code |
-n, --dry-run |
Perform a dry run |
--pool |
Resource pool to use |
--rerun-failed-tasks |
Re-run previously failed task instances within the date range |
--reset-dagruns |
Delete existing backfill-related DAG runs and start fresh |
-B, --run-backwards |
Run tasks from the most recent date first. Incompatible with |
--delay-on-limit |
Time (in seconds) to wait before retrying when max active DAG runs limit is reached |
--disable-retry |
Mark failed tasks as failed without retrying |
-c, --conf |
JSON string to be stored in the DAG run’s |
-y |
Skip confirmation prompt when resetting DAG runs |
-S, --subdir |
Path to the DAG files directory. Defaults to |
--treat-dag-as-regex |
Interpret |
--treat-dag-id-as-regex |
Alias for |
-h, --help |
Print out the help manual for this command |
-v, --verbose |
Make logging output more verbose |