Skip to main content

astro dbt deploy

public preview
This feature is in Public Preview.
info

This command is only available on Astro.

This command allows you to deploy your dbt code directly to Astro, independently of any DAG deploys or full project image deploys.

This command bundles all files in your dbt project and pushes them to Astro, where they are mounted on your Airflow containers so that your DAGs can access them.

When you run astro dbt deploy, the CLI prompts you to select from a list of all Deployments that you can access across Workspaces. To bypass this prompt, you can also specify a Deployment ID in the command. To retrieve a Deployment ID, open your Deployment in the Astro UI and copy the value in the ID section of the Deployment page. You can also run astro deployment list to find a Deployment ID or name.

Usage

astro dbt deploy <your-deployment-id> <options>

Options

OptionDescriptionPossible Values
-n, --deployment-nameName of the Deployment to deploy your dbt project toAny valid Deployment name
--descriptionDescription of the project to store on the deployString
-m, --mount-pathPath describing where to mount the dbt project in Airflow, so that it is accessible to your DAGs. Default path is /usr/local/airflow/dbt/<dbt-project-name>Any valid path except /usr/local/airflow/dags, which is used for DAG deploys
-p, --project-pathPath to the dbt project that you want to deploy. The default is your current directoryAny valid filepath to a dbt project
-w, --waitWait for the Deployment to become healthy before ending the deploy command. Default is FalseTrue or False
--workspace-idThe Workspace ID for the Deployment where you want to deploy your dbt projectAny valid Workspace ID

Examples

To deploy directly to a specific Deployment:

astro dbt deploy clyxf7lfs000108jtcs4b59nm

to deploy a project to a specific deployment on the mount path, example-path.

astro dbt deploy clyxf7lfs000108jtcs4b59nm --mount-path="/usr/local/airflow/dbt/test-dbt-project"

See also

Was this page helpful?