test

Definition

Executes one single DAG run for a given DAG and execution date.

Usage

$ airflow dags test [-h] [-c CONF] [--imgcat-dagrun]
                  [--mark-success-pattern MARK_SUCCESS_PATTERN]
                  [--save-dagrun SAVE_DAGRUN] [--show-dagrun] [-S SUBDIR]
                  [--use-executor] [-v]
                  dag_id [execution_date]

Arguments

Parameter Description

dag_id

The ID of the DAG

execution_date

The DAG execution date (optional)

-S, --subdir

File or directory location for DAGs. Defaults to [AIRFLOW_HOME]/dags, where [AIRFLOW_HOME] is the value set for AIRFLOW_HOME config in airflow.cfg

-c, --conf

JSON string that gets pickled into the DAG run conf attribute

--imgcat-dagrun

After completing the DAG run, prints a diagram on the screen for the current DAG run using the imgcat tool. This option only works in iTerm

--mark-success-pattern

Do not run task_ids matching the regex <MARK_SUCCESS_PATTERN>, mark them as successful instead. Can be used to skip dependency check sensors or cleanup steps in local testing

--save-dagrun

After completing the backfill, saves the diagram for current DAG run to the indicated file

--show-dagrun

After completing the backfill, shows the diagram for the current DAG run. The diagram is in the DOT format

--use-executor

Use an executor to test the DAG. By default the DAG is run without an executor. If set, the executor configured in the environment is used

-h, --help

Print out the help manual for this command

-v, --verbose

Make logging output more verbose

Found a mistake? Seleсt text and press Ctrl+Enter to report it