DAG-level parameters in Airflow
In Airflow, you can configure when and how your DAG runs by setting parameters in the DAG object. DAG-level parameters affect how the entire DAG behaves, as opposed to task-level parameters which only affect a single task or Airflow configs which affect the entire Airflow instance.
This guide covers all user-relevant DAG-level parameters in Airflow.
Basic DAG-level parameters
There are four basic DAG-level parameters. It is best practice to always set these parameters in any DAG:
UI parameters
Some parameters add documentation to a DAG or change its appearance in the Airflow UI:
Jinja templating parameters
There are parameters that relate to Jinja templating, such as:
Scaling
Some parameters can be used to scale your DAG’s resource usage in Airflow. See Scaling Airflow to optimize performance for more information.
Callback parameters
These parameters help you configure the behavior of Airflow callbacks.
On Astro, you can use Astro alerts instead of or in addition to Airflow callbacks. See When to use Airflow or Astro alerts for your pipelines on Astro for more information.
Other parameters
Other DAG parameters include: