Skip to main content

astro run

info

The behavior and format of this command are the same for both Astro and Software.

Trigger a single DAG run 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 Test your Astro project locally.

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.
--execution-dateThe execution date for the DAG run.An execution date formatted as either YYYY-MM-DD, YYYY-MM-DDTHH:MM:SS. or YYYY-MM-DD HH:MM:SS.
--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

Was this page helpful?

Sign up for Developer Updates

Get a summary of new Astro features once a month.

You can unsubscribe at any time.
By proceeding you agree to our Privacy Policy, our Website Terms and to receive emails from Astronomer.