--- id: astronomer-cosmos version: "1.15.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # astronomer-cosmos — Orchestrate your dbt projects in Airflow License: permissive · Maintenance: active · Downloads: 9.7M/mo ## 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 above — 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 pip install astronomer-cosmos uv add astronomer-cosmos 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_current - Install friction: low - Maintenance: active - Downloads: 9.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags dbt airflow orchestration, run dbt in airflow, dbt dag generator, airflow dbt integration, dbt task scheduling, airflow dbt provider, orchestrate dbt projects, dbt-integration, airflow-provider, data-orchestration [View on SkillFed](https://skillfed.io/packages/astronomer-cosmos) · [View on PyPI](https://pypi.org/project/astronomer-cosmos/)