skillfed

astronomer-cosmos

Orchestrate your dbt projects in Airflow

astronomer-cosmos v1.15.1 9.7M downloads/30d#1,506 on PyPI1,247
Permissive license Apache-2.0 Active released

What it is and what it does

Astronomer Cosmos is a bridge between dbt Core and Apache Airflow that converts dbt projects into native Airflow DAGs and Task Groups. Instead of running dbt through profiles and CLI commands, you define your dbt project in Python code and Cosmos generates Airflow tasks for each model, test, and snapshot, complete with dependencies, retries, and alerting.

The package runs dbt in isolated virtual environments by default to avoid dependency conflicts with Airflow, and integrates with Airflow's connection system so you can manage data warehouse credentials through Airflow rather than dbt profiles. It enables data-aware scheduling—running dbt models immediately after upstream data ingestion—and lets you inspect and retry individual models as Airflow tasks. It depends on apache-airflow, jinja2, attrs, packaging, and several other standard libraries.

Use it for:

  • Convert an existing dbt project into an Airflow DAG with minimal code changes to enable Airflow-native scheduling and monitoring.
  • Run dbt tests immediately after model completion to catch data quality issues early in the pipeline.
  • Manage dbt credentials and connections through Airflow's connection system instead of maintaining separate dbt profiles.
  • Orchestrate dbt alongside non-dbt tasks (API calls, Python scripts, SQL queries) in a single Airflow DAG.
  • Use Airflow's data-aware scheduling to trigger dbt models only after upstream data sources are refreshed.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Renders dbt Core projects as Apache Airflow DAGs and Task Groups, allowing you to orchestrate dbt workflows using Airflow's scheduling, connections, and task management instead of dbt profiles.

Yes. The package is production-stable (Development Status 5), actively maintained with recent releases, has no known vulnerabilities, and solves a real integration gap for teams using both dbt and Airflow. Install friction is low, and the Apache 2.0 license is permissive. Recommended if you orchestrate dbt workflows in Airflow.

Install

astronomer-cosmos on PyPI

pip

pip install astronomer-cosmos

uv

uv add astronomer-cosmos

poetry

poetry add astronomer-cosmos

Installing astronomer-cosmos

Before you install

Low friction install with a wheel distribution. Depends on apache-airflow and 8 other packages; all are standard Python libraries or Airflow ecosystem components. Actively maintained with a release 10 days ago and 1247 repository stars.

License in practice

Apache License 2.0 (permissive). You can use, modify, and distribute this package freely in commercial and open-source projects, provided you include the license notice.

Quickstart

pip install astronomer-cosmos

from cosmos import DbtDag

my_dag = DbtDag(
    dag_id='my_dbt_dag',
    project_dir='/path/to/dbt/project'
)

Requires Apache Airflow to be installed and configured; Python >= 3.10.

Verify before relying

  • Whether virtual environment isolation for dbt is automatic or requires explicit configuration.
  • Supported dbt Core versions and any version compatibility constraints.
  • Performance characteristics when handling large dbt projects with many models.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 9 — aenum, apache-airflow, attrs, deprecation, jinja2, msgpack, openlineage-integration-common, packaging, virtualenv
Maintenance actively maintained — 10 days since the last release
Last repo commit
First released
Downloads 9,680,418/month — #1,506 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: astronomer_cosmos-1.15.1-py3-none-any.whl

Keywords: airflow, apache-airflow, astronomer, dags, dbt, dbt-core, dbt-fusion

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: Apache AirflowFramework :: Apache Airflow :: ProviderIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

dbt airflow orchestrationrun dbt in airflowdbt dag generatorairflow dbt integrationdbt task schedulingairflow dbt providerorchestrate dbt projects
dbt-integrationairflow-providerdata-orchestration

More Build Tools packages