Skip to main content

astro run

Run a single DAG in a local Airflow environment and see task success or failure in your terminal. This command compiles your DAG and runs it in a single Airflow worker container based on your Astro project configurations.

For more information, see Run a DAG with Astro Run.

Usage

astro run <dag-id>

Options

OptionDescriptionPossible Values
-d, --dag-fileThe location of your DAG file. When you specify this flag, only the specified DAG is parsed by the Astro CLI. All other DAGs in the project are ignored.Any valid DAG file in your dags directory.
-e,--envPath to an alternative environment variable file. The default is .env in your current Astro project.Any valid filepath.
--no-cacheBuild your Astro project into a Docker image without using cache.None.
-s, --settings-fileAn alternative settings file from which Airflow objects are imported. The default is airflow_settings.yaml in your current Astro project.Any valid filepath.

Examples

# Run a DAG with an alternative set of environment variables
$ astro run example_dag_basic --env dev.env