Guides#
Cosmos offers a number of configuration options to customize how Airflow dags and dbt commands run.
To set up a project, you follow the same general set of steps.
Set up dbt with Airflow#
Make your dbt projects available to Airflow and install dbt into the environment where your dbt code runs.
Set up dbt with Airflow
Connect to your dbt database#
Configure your Cosmos project to allow Airflow Dags to initiate dbt commands, and make data transformations and updates in your data warehouses. You can create these connections with your profiles.yml file in the dbt project, using profile mappings, or customizing ProfileConfig per dbt configuration.
Translate your dbt code into Airflow Dags#
You can customize how Cosmos parses your dbt workflows into Airflow Dags. Choosing how you want your dbt nodes to map to Airflow tasks within Dags can affect the time required for Cosmos to parse the dbt workflows and for Airflow to execute the resulting Dags.
Run dbt#
Specify more details about how Cosmos runs both dbt commands and Airflow Dags. This includes Choose an execution mode , either one that runs dbt on an Airflow worker node or one that runs in a container. You can customize additional aspects of how your dbt code runs, like using particular operators that correspond to dbt commands. And, you can leverage Airflow’s scheduling capabilities in your Cosmos Dags.
Multi-project Setups#
If you have a multi-project architecture where you have multiple dbt projects that reference each others’ models, you can set up dbt-loom with Cosmos to handle cross-project references.
Multi-project Setups
Add your dbt documentation#
Cosmos supports dbt’s documentation capabilities.
dbt Documentation
Cosmos DevEx#
You can configure Cosmos to improve your development experience.
Cosmos DevEx