
Cosmos Dbt Fusion
- 757 installs
- 412 repo stars
- Updated July 27, 2026
- astronomer/agents
cosmos-dbt-fusion is an agent skill that configures Astronomer Cosmos to run dbt Fusion projects on Airflow for developers who transform data in Snowflake or Databricks warehouses using LOCAL execution mode.
About
cosmos-dbt-fusion is a configuration reference skill for running dbt Fusion projects through Astronomer Cosmos on Apache Airflow. Fusion support is limited to ExecutionMode.LOCAL with Snowflake or Databricks warehouses, and the skill documents ProfileConfig mappings such as SnowflakeUserPasswordProfileMapping alongside operator_args settings and Airflow 3 compatibility notes. Data engineers reach for cosmos-dbt-fusion when wiring dbt-snowflake or Databricks adapters into Cosmos operators, defining warehouse connections, and aligning DAG tasks with Fusion constraints. It reduces trial-and-error when migrating Cosmos setups from classic dbt Core projects to Fusion-only execution paths.
- Supports only ExecutionMode.LOCAL for dbt Fusion projects
- Provides ProfileConfig examples for SnowflakeUserPasswordProfileMapping and DatabricksTokenProfileMapping
- Includes Airflow 3 compatibility guidance
- Recommended pattern uses Airflow Connection + ProfileMapping
- Limited to Snowflake and Databricks warehouses in public beta
Cosmos Dbt Fusion by the numbers
- 757 all-time installs (skills.sh)
- Ranked #1,338 of 16,659 AI & Agent Building skills by installs in the Skillselion catalog
- Security screen: CRITICAL risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/astronomer/agents --skill cosmos-dbt-fusionAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 757 |
|---|---|
| repo stars | ★ 412 |
| Security audit | 1 / 3 scanners passed |
| Last updated | July 27, 2026 |
| Repository | astronomer/agents ↗ |
How do you run dbt Fusion on Airflow with Cosmos?
Configure Cosmos for running dbt Fusion projects with Airflow using Snowflake or Databricks warehouses.
Who is it for?
Data engineers integrating dbt Fusion models into Airflow DAGs on Snowflake or Databricks with Astronomer Cosmos.
Skip if: dbt Cloud-only deployments, non-Fusion dbt Core projects, or warehouses outside the Fusion-supported Snowflake and Databricks adapters.
When should I use this skill?
A developer configures Cosmos for a dbt Fusion project, ProfileConfig warehouse mappings, or Airflow 3 compatibility with Fusion LOCAL mode.
What you get
Cosmos ProfileConfig mappings, operator_args settings, and Airflow DAG integration for dbt Fusion LOCAL runs.
- Cosmos ProfileConfig mappings
- operator_args configuration
- Airflow DAG integration for dbt Fusion
By the numbers
- Fusion LOCAL mode supports 2 warehouses: Snowflake and Databricks
- Documents SnowflakeUserPasswordProfileMapping for dbt-snowflake Fusion profiles
Files
Cosmos + dbt Fusion: Implementation Checklist
Execute steps in order. This skill covers Fusion-specific constraints only.
Version note: dbt Fusion support was introduced in Cosmos 1.11.0. Requires Cosmos ≥1.11.
>
Reference: See [reference/cosmos-config.md](reference/cosmos-config.md) for ProfileConfig, operator_args, and Airflow 3 compatibility details.
Before starting, confirm: (1) dbt engine = Fusion (not Core → use cosmos-dbt-core), (2) warehouse = Snowflake, Databricks, Bigquery and Redshift only.
Fusion-Specific Constraints
| Constraint | Details |
|---|---|
| No async | AIRFLOW_ASYNC not supported |
| No virtualenv | Fusion is a binary, not a Python package |
| Warehouse support | Snowflake, Databricks, Bigquery and Redshift support while in preview |
---
1. Confirm Cosmos Version
CRITICAL: Cosmos 1.11.0 introduced dbt Fusion compatibility.
# Check installed version
pip show astronomer-cosmos
# Install/upgrade if needed
pip install "astronomer-cosmos>=1.11.0"Validate: pip show astronomer-cosmos reports version ≥ 1.11.0
---
2. Install the dbt Fusion Binary (REQUIRED)
dbt Fusion is NOT bundled with Cosmos or dbt Core. Install it into the Airflow runtime/image.
Determine where to install the Fusion binary (Dockerfile / base image / runtime).
Example Dockerfile Install
USER root
RUN apt-get update && apt-get install -y curl
ENV SHELL=/bin/bash
RUN curl -fsSL https://public.cdn.getdbt.com/fs/install/install.sh | sh -s -- --update
USER astroCommon Install Paths
| Environment | Typical path |
|---|---|
| Astro Runtime | /home/astro/.local/bin/dbt |
| System-wide | /usr/local/bin/dbt |
Validate: The dbt binary exists at the chosen path and dbt --version succeeds.
---
3. Choose Parsing Strategy (RenderConfig)
Parsing strategy is the same as dbt Core. Pick ONE:
| Load mode | When to use | Required inputs |
|---|---|---|
dbt_manifest | Large projects; fastest parsing | ProjectConfig.manifest_path |
dbt_ls | Complex selectors; need dbt-native selection | Fusion binary accessible to scheduler |
automatic | Simple setups; let Cosmos pick | (none) |
from cosmos import RenderConfig, LoadMode
_render_config = RenderConfig(
load_method=LoadMode.AUTOMATIC, # or DBT_MANIFEST, DBT_LS
)---
4. Configure Warehouse Connection (ProfileConfig)
Reference: See [reference/cosmos-config.md](reference/cosmos-config.md#profileconfig-warehouse-connection) for full ProfileConfig options and examples.
from cosmos import ProfileConfig
from cosmos.profiles import SnowflakeUserPasswordProfileMapping
_profile_config = ProfileConfig(
profile_name="default",
target_name="dev",
profile_mapping=SnowflakeUserPasswordProfileMapping(
conn_id="snowflake_default",
),
)---
5. Configure ExecutionConfig (LOCAL Only)
CRITICAL: dbt Fusion with Cosmos requiresExecutionMode.LOCALwithdbt_executable_pathpointing to the Fusion binary.
from cosmos import ExecutionConfig
from cosmos.constants import InvocationMode
_execution_config = ExecutionConfig(
invocation_mode=InvocationMode.SUBPROCESS,
dbt_executable_path="/home/astro/.local/bin/dbt", # REQUIRED: path to Fusion binary
# execution_mode is LOCAL by default - do not change
)---
6. Configure Project (ProjectConfig)
from cosmos import ProjectConfig
_project_config = ProjectConfig(
dbt_project_path="/path/to/dbt/project",
# manifest_path="/path/to/manifest.json", # for dbt_manifest load mode
# install_dbt_deps=False, # if deps precomputed in CI
)---
7. Assemble DAG / TaskGroup
Option A: DbtDag (Standalone)
from cosmos import DbtDag, ProjectConfig, ProfileConfig, ExecutionConfig, RenderConfig
from cosmos.profiles import SnowflakeUserPasswordProfileMapping
from pendulum import datetime
_project_config = ProjectConfig(
dbt_project_path="/usr/local/airflow/dbt/my_project",
)
_profile_config = ProfileConfig(
profile_name="default",
target_name="dev",
profile_mapping=SnowflakeUserPasswordProfileMapping(
conn_id="snowflake_default",
),
)
_execution_config = ExecutionConfig(
dbt_executable_path="/home/astro/.local/bin/dbt", # Fusion binary
)
_render_config = RenderConfig()
my_fusion_dag = DbtDag(
dag_id="my_fusion_cosmos_dag",
project_config=_project_config,
profile_config=_profile_config,
execution_config=_execution_config,
render_config=_render_config,
start_date=datetime(2025, 1, 1),
schedule="@daily",
)Option B: DbtTaskGroup (Inside Existing DAG)
from airflow.sdk import dag, task # Airflow 3.x
# from airflow.decorators import dag, task # Airflow 2.x
from airflow.models.baseoperator import chain
from cosmos import DbtTaskGroup, ProjectConfig, ProfileConfig, ExecutionConfig
from pendulum import datetime
_project_config = ProjectConfig(dbt_project_path="/usr/local/airflow/dbt/my_project")
_profile_config = ProfileConfig(profile_name="default", target_name="dev")
_execution_config = ExecutionConfig(dbt_executable_path="/home/astro/.local/bin/dbt")
@dag(start_date=datetime(2025, 1, 1), schedule="@daily")
def my_dag():
@task
def pre_dbt():
return "some_value"
dbt = DbtTaskGroup(
group_id="dbt_fusion_project",
project_config=_project_config,
profile_config=_profile_config,
execution_config=_execution_config,
)
@task
def post_dbt():
pass
chain(pre_dbt(), dbt, post_dbt())
my_dag()---
8. Final Validation
Before finalizing, verify:
- [ ] Cosmos version: ≥1.11.0
- [ ] Fusion binary installed: Path exists and is executable
- [ ] Warehouse supported: Snowflake, Databricks, Bigquery or Redshift only
- [ ] Secrets handling: Airflow connections or env vars, NOT plaintext
Troubleshooting
If user reports dbt Core regressions after enabling Fusion:
AIRFLOW__COSMOS__PRE_DBT_FUSION=1User Must Test
- [ ] The DAG parses in the Airflow UI (no import/parse-time errors)
- [ ] A manual run succeeds against the target warehouse (at least one model)
---
Reference
- Cosmos dbt Fusion docs: https://astronomer.github.io/astronomer-cosmos/configuration/dbt-fusion.html
- dbt Fusion install: https://docs.getdbt.com/docs/core/pip-install#dbt-fusion
---
Related Skills
- cosmos-dbt-core: For dbt Core projects (not Fusion)
- authoring-dags: General DAG authoring patterns
- testing-dags: Testing DAGs after creation
Cosmos Configuration Reference (Fusion)
This reference covers Cosmos configuration for dbt Fusion projects. Fusion only supports ExecutionMode.LOCAL with Snowflake or Databricks warehouses.
Table of Contents
---
ProfileConfig: Warehouse Connection
Supported ProfileMapping Classes (Fusion)
| Warehouse | dbt Adapter Package | ProfileMapping Class |
|---|---|---|
| Snowflake | dbt-snowflake | SnowflakeUserPasswordProfileMapping |
| Databricks | dbt-databricks | DatabricksTokenProfileMapping |
Note: Fusion currently only supports Snowflake and Databricks (public beta).
Option A: Airflow Connection + ProfileMapping (Recommended)
from cosmos import ProfileConfig
from cosmos.profiles import SnowflakeUserPasswordProfileMapping
_profile_config = ProfileConfig(
profile_name="default", # REQUIRED
target_name="dev", # REQUIRED
profile_mapping=SnowflakeUserPasswordProfileMapping(
conn_id="snowflake_default", # REQUIRED
profile_args={"schema": "my_schema"}, # OPTIONAL
),
)Databricks example:
from cosmos import ProfileConfig
from cosmos.profiles import DatabricksTokenProfileMapping
_profile_config = ProfileConfig(
profile_name="default",
target_name="dev",
profile_mapping=DatabricksTokenProfileMapping(
conn_id="databricks_default",
),
)Option B: Existing profiles.yml File
CRITICAL: Do not hardcode secrets in profiles.yml; use environment variables.from cosmos import ProfileConfig
_profile_config = ProfileConfig(
profile_name="my_profile", # REQUIRED: must match profiles.yml
target_name="dev", # REQUIRED: must match profiles.yml
profiles_yml_filepath="/path/to/profiles.yml", # REQUIRED
)---
operator_args Configuration
The operator_args dict accepts parameters passed to Cosmos operators:
| Category | Examples |
|---|---|
| BaseOperator params | retries, retry_delay, on_failure_callback, pool |
| Cosmos-specific params | install_deps, full_refresh, quiet, fail_fast |
| Runtime dbt vars | vars (string that renders as YAML) |
Example Configuration
_operator_args = {
# BaseOperator params
"retries": 3,
# Cosmos-specific params
"install_deps": False, # if deps precomputed
"full_refresh": False, # for incremental models
"quiet": True, # only log errors
}Passing dbt vars at Runtime (XCom / Params)
Use operator_args["vars"] to pass values from upstream tasks or Airflow params:
# Pull from upstream task via XCom
_operator_args = {
"vars": '{"my_department": "{{ ti.xcom_pull(task_ids=\'pre_dbt\', key=\'return_value\') }}"}',
}
# Pull from Airflow params (for manual runs)
@dag(params={"my_department": "Engineering"})
def my_dag():
dbt = DbtTaskGroup(
# ...
operator_args={
"vars": '{"my_department": "{{ params.my_department }}"}',
},
)---
Airflow 3 Compatibility
Import Differences
| Airflow 3.x | Airflow 2.x |
|---|---|
from airflow.sdk import dag, task | from airflow.decorators import dag, task |
from airflow.sdk import chain | from airflow.models.baseoperator import chain |
Asset/Dataset URI Format Change
Cosmos ≤1.9 (Airflow 2 Datasets):
postgres://0.0.0.0:5434/postgres.public.ordersCosmos ≥1.10 (Airflow 3 Assets):
postgres://0.0.0.0:5434/postgres/public/ordersCRITICAL: If you have downstream DAGs scheduled on Cosmos-generated datasets and are upgrading to Airflow 3, update the asset URIs to the new format.
Related skills
How it compares
Use this for Fusion-specific Cosmos LOCAL configuration; use general Airflow DAG skills when orchestration does not involve dbt Fusion warehouse runs.
FAQ
Which warehouses does cosmos-dbt-fusion support?
cosmos-dbt-fusion supports dbt Fusion with ExecutionMode.LOCAL on Snowflake and Databricks warehouses. ProfileConfig examples include SnowflakeUserPasswordProfileMapping with the dbt-snowflake adapter package.
What execution mode does dbt Fusion require in Cosmos?
dbt Fusion in Cosmos requires ExecutionMode.LOCAL according to the cosmos-dbt-fusion reference. The skill documents ProfileConfig, operator_args, and Airflow 3 compatibility for that LOCAL-only Fusion path.
Is Cosmos Dbt Fusion safe to install?
skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.