Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
94ad887
Create config subfolder structure
lzdanski Feb 27, 2026
5bca1f2
move execution methods
lzdanski Feb 27, 2026
e085c2a
rename to guides
lzdanski Feb 27, 2026
febd2f4
update hradcoded URLs
lzdanski Feb 27, 2026
6baf8da
redistribute files
lzdanski Feb 27, 2026
577b61c
improve build errors
lzdanski Mar 2, 2026
d0e7343
fix index
lzdanski Mar 2, 2026
06969b1
fix rel-link build errors
lzdanski Mar 2, 2026
f5f5e33
fix typo
lzdanski Mar 2, 2026
32c92a9
reformat ref structure
lzdanski Mar 2, 2026
721f247
restructure
lzdanski Mar 2, 2026
dcb01b4
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
pre-commit-ci[bot] Mar 2, 2026
f274856
fix build errors
lzdanski Mar 3, 2026
6b4f5b6
add optimize, execution modes redirects
lzdanski Mar 3, 2026
b387f22
Apply suggestions from code review
lzdanski Mar 4, 2026
1d61288
Link and directory fixes
lzdanski Mar 4, 2026
c1598ec
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
pre-commit-ci[bot] Mar 5, 2026
ed0b919
update index page
lzdanski Mar 5, 2026
d7b77e2
move pages update redirects
lzdanski Mar 5, 2026
c8b6fad
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
pre-commit-ci[bot] Mar 5, 2026
1f4e8d8
Apply suggestions from code review
lzdanski Mar 5, 2026
e830d80
Add guides index feedback
lzdanski Mar 6, 2026
2f20416
update translate dbt to airflow
lzdanski Mar 6, 2026
8bbf203
update sidebar structure
lzdanski Mar 6, 2026
a8ca80d
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
pre-commit-ci[bot] Mar 6, 2026
aae514f
update rel-links
lzdanski Mar 6, 2026
c95a934
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
pre-commit-ci[bot] Mar 6, 2026
c81ad22
multi-project nav fix
lzdanski Mar 6, 2026
eaa701a
Refactor translate dbt to airflow
lzdanski Mar 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,28 @@
redirects = {
"airflow3_compatibility/index": "../policy/airflow3-compatibility.html",
"compatibility-policy": "../policy/compatibility-policy.html",
"configuration/caching": "../optimize_performance/caching.html",
"configuration/dag-customization": "../guides/translate_dbt_to_airflow/dag-customization.html",
"configuration/memory_optimization": "../optimize_performance/memory_optimization.html",
"configuration/parsing-methods": "../guides/translate_dbt_to_airflow/parsing-methods.html",
"configuration/partial-parsing": "../guides/run_dbt/customization/partial-parsing.html",
"configuration/render-config": "../guides/translate_dbt_to_airflow/render-config.html",
"configuration/selecting-excluding": "../guides/translate_dbt_to_airflow/selecting-excluding.html",
"configuration/source-nodes-rendering": "../guides/translate_dbt_to_airflow/managing-sources.html",
"configuration/testing-behavior": "../guides/translate_dbt_to_airflow/testing-behavior.html",
"contributing": "../policy/contributing.html",
"contributors": "../policy/contributors.html",
"contributors-roles": "../policy/contributors-roles.html",
"getting_started/async-execution-mode": "../guides/run_dbt/airflow-worker/async-execution-mode.html",
"getting_started/aws-container-run-job": "../guides/run_dbt/airflow-worker/async-execution-mode.html",
"getting_started/azure-container-instance": "../guides/run_dbt/container/azure-container-instance.html",
"getting_started/custom-airflow-properties": "../guides/run_dbt/customization/custom-airflow-properties.html",
"getting_started/docker": "../guides/run_dbt/container/docker.html",
"getting_started/execution-modes-local-conflicts": "../guides/run_dbt/airflow-worker/execution-modes-local-conflicts.html",
"getting_started/execution-modes": "../guides/run_dbt/execution-modes.html",
"getting_started/gcp-cloud-run-job": "../guides/run_dbt/container/gcp-cloud-run-job.html",
"getting_started/kubernetes": "../guides/run_dbt/container/kubernetes.html",
"getting_started/operators": "../guides/run_dbt/operators/operators.html",
"getting_started/watcher-execution-mode": "../guides/run_dbt/airflow-worker/watcher-execution-mode.html",
"getting_started/watcher-kubernetes-execution-mode": "../guides/run_dbt/container/watcher-kubernetes-execution-mode.html",
}
36 changes: 0 additions & 36 deletions docs/configuration/index.rst

This file was deleted.

4 changes: 2 additions & 2 deletions docs/getting_started/astro.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _astro:

Getting Started on Astro
========================
Getting Started with Cosmos on Astro
====================================

While it is possible to use Cosmos on Astro with all :ref:`Execution Modes <execution-modes>`, we recommend using the ``local`` execution mode. It's the simplest to set up and use.

Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started/dbt-airflow-concepts.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _dbt-airflow-concepts:

Similar dbt & Airflow concepts
==============================
Similar dbt and Airflow concepts
================================

While dbt is an open source tool for data transformations and analysis, using SQL, Airflow focuses on being a platform
for the development, scheduling and monitoring of batch-oriented workflows, using Python. Although both tools have many
Expand Down
50 changes: 29 additions & 21 deletions docs/getting_started/index.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
.. _getting-started:

.. toctree::
:maxdepth: 1
:hidden:
:caption: Contents:
:caption: Cosmos Fundamentals

Similar dbt and Airflow concepts <dbt-airflow-concepts>

.. toctree::
:maxdepth: 1
:hidden:
:caption: Quickstart

Astro CLI quickstart <astro-cli-quickstart>

.. toctree::
:maxdepth: 1
:hidden:
:caption: Get started with Cosmos

Open-source Airflow <open-source>
Astro <astro>
MWAA <mwaa>
GCC <gcc>
Open-Source <open-source>
Execution Modes <execution-modes>
Docker Execution Mode <docker>
Kubernetes Execution Mode <kubernetes>
Azure Container Instance Execution Mode <azure-container-instance>
AWS Container Run Job Execution Mode <aws-container-run-job>
GCP Cloud Run Job Execution Mode <gcp-cloud-run-job>
Airflow Async Execution Mode <async-execution-mode>
Watcher Execution Mode <watcher-execution-mode>
Watcher Kubernetes Execution Mode <watcher-kubernetes-execution-mode>
dbt and Airflow Similar Concepts <dbt-airflow-concepts>
Operators <operators>
Custom Airflow Properties <custom-airflow-properties>
Amazon Managed Workflows for Apache Airflow (MWAA) <mwaa>
Comment thread
lzdanski marked this conversation as resolved.
Google Cloud Composer (GCC) <gcc>


Getting Started
Expand Down Expand Up @@ -83,8 +85,14 @@ For more customization, check out the different execution modes that Cosmos supp

For specific guides, see the following:

- `Executing dbt Dags with DockerOperators <docker.html>`__
- `Executing dbt Dags with KubernetesPodOperators <kubernetes.html>`__
- `Executing dbt Dags with Watcher Kubernetes Mode <watcher-kubernetes-execution-mode.html>`__
- `Executing dbt Dags with AzureContainerInstancesOperators <azure-container-instance.html>`__
- `Executing dbt Dags with GcpCloudRunExecuteJobOperators <gcp-cloud-run-job.html>`__
- `Executing dbt DAGs with DockerOperators <../../guides/run_dbt/container/docker.html>`__
- `Executing dbt DAGs with KubernetesPodOperators <../../guides/run_dbt/container/kubernetes.html>`__
- `Executing dbt DAGs with Watcher Kubernetes Mode <../../guides/run_dbt/container/watcher-kubernetes-execution-mode.html>`__
- `Executing dbt DAGs with AzureContainerInstancesOperators <../../guides/run_dbt/container/azure-container-instance.html>`__
- `Executing dbt DAGs with GcpCloudRunExecuteJobOperators <../../guides/run_dbt/container/gcp-cloud-run-job.html>`__
Comment thread
tatiana marked this conversation as resolved.


Concepts Overview
-----------------

How do dbt and Airflow concepts map to each other? Learn more `in this link <dbt-airflow-concepts.html>`__.
4 changes: 2 additions & 2 deletions docs/getting_started/mwaa.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _mwaa:

Getting Started on MWAA
=======================
Getting Started with Cosmos on Amazon Managed Workflows
=======================================================

Users can face Python dependency issues when trying to use the Cosmos `Local Execution Mode <execution-modes.html#local>`_ in Amazon Managed Workflows for `Apache Airflow® <https://airflow.apache.org/>`_ (MWAA).

Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started/open-source.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _open-source:

Getting Started on Open Source Airflow
======================================
Getting Started with Cosmos on Open-source Airflow
==================================================

When running open-source Airflow, your setup may vary. This guide assumes you have access to edit the underlying image.

Expand Down
File renamed without changes.
File renamed without changes.
62 changes: 62 additions & 0 deletions docs/guides/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
.. _guides:

Guides
======

Cosmos offers a number of configuration options to customize its behavior. For more info, check out the links on the left or the table of contents below.

.. toctree::
:maxdepth: 1
:hidden:
:caption: Set up dbt with Airflow

dbt_setup/dbt-fusion
Comment thread
lzdanski marked this conversation as resolved.

Comment thread
lzdanski marked this conversation as resolved.
.. toctree::
:maxdepth: 1
:hidden:
:caption: Translating dbt into Airflow

translate_dbt_to_airflow/parsing-methods
Selecting what to run <translate_dbt_to_airflow/selecting-excluding>
Configure tests <translate_dbt_to_airflow/testing-behavior>
translate_dbt_to_airflow/managing-sources
translate_dbt_to_airflow/render-config
Customize node conversion <translate_dbt_to_airflow/dag-customization>

.. toctree::
:maxdepth: 3
:hidden:
:caption: How Cosmos runs dbt

run_dbt/execution-modes
run_dbt/airflow-worker/index
run_dbt/container/index
run_dbt/callbacks/callbacks
run_dbt/operators/operators
run_dbt/customization/index
Comment thread
lzdanski marked this conversation as resolved.

.. toctree::
:maxdepth: 1
:hidden:
:caption: Multi-project Setups

Handle cross-project references <multi_project/multi-project>

.. toctree::
:maxdepth: 1
:hidden:
:caption: dbt Documentation

dbt_docs/generating-docs
dbt_docs/hosting-docs

.. toctree::
:maxdepth: 1
:hidden:
:caption: Cosmos DevEx

cosmos_devex/lineage
cosmos_devex/compiled-sql
cosmos_devex/logging
cosmos_devex/task-display-name
Comment thread
lzdanski marked this conversation as resolved.
Comment thread
lzdanski marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ You can use either separate DAGs or a combined DAG with task groups.

**Option 1: Combined DAG with Task Groups using dbt ls Load Mode (Recommended)**

.. literalinclude:: ../../dev/dags/cross_project_dbt_ls_dag.py
.. literalinclude:: ../../../dev/dags/cross_project_dbt_ls_dag.py
:language: python
:start-after: [START cross_project_dbt_ls_dag]
:end-before: [END cross_project_dbt_ls_dag]
Expand All @@ -178,7 +178,7 @@ You can use either separate DAGs or a combined DAG with task groups.

This option uses pre-generated ``manifest.json`` files for faster DAG parsing (no ``dbt ls`` execution required).

.. literalinclude:: ../../dev/dags/cross_project_manifest_dag.py
.. literalinclude:: ../../../dev/dags/cross_project_manifest_dag.py
:language: python
:start-after: [START cross_project_manifest_dag]
:end-before: [END cross_project_manifest_dag]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.. _async-execution-mode:

.. title:: Getting Started with Deferrable Operator

Airflow Async Execution Mode
============================

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ When using the `Local Execution Mode <execution-modes.html#local>`__, users may

If you find errors, we recommend users isolating the installation of dbt from the Airflow installation.
With the `Local Execution Mode <execution-modes.html#local>`__, this can be accomplished by installing dbt in a separate
Python virtualenv and setting the `ExecutionConfig.dbt_executable_path <../configuration/execution-config.html>`_ and
`RenderConfig.dbt_executable_path <../configuration/render-config.html>`_ parameters.
Python virtualenv and setting the `ExecutionConfig.dbt_executable_path <../guides/execution-config.html>`_ and
`RenderConfig.dbt_executable_path <../guides/render-config.html>`_ parameters.

The page `execution modes <execution-modes.html>`__ describes many other methods that support isolating dbt from Airflow.

Expand Down
9 changes: 9 additions & 0 deletions docs/guides/run_dbt/airflow-worker/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Run dbt in an Airflow worker
============================

.. toctree::
:maxdepth: 1
:caption: Run dbt in an Airflow worker

async-execution-mode
watcher-execution-mode
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Example 1 — Using ``DbtDag`` with ``ExecutionMode.WATCHER``
You can enable WATCHER mode directly in your ``DbtDag`` configuration.
This approach is best when your Airflow DAG is fully dedicated to a dbt project.

.. literalinclude:: ../../dev/dags/example_watcher.py
.. literalinclude:: ../../../../dev/dags/example_watcher.py
:language: python
:start-after: [START example_watcher]
:end-before: [END example_watcher]
Expand Down Expand Up @@ -370,7 +370,7 @@ Source freshness nodes

Since Cosmos 1.6, it `supports the rendering of source nodes <https://www.astronomer.io/blog/native-support-for-source-node-rendering-in-cosmos/>`_.

We noticed some Cosmos users use this feature alongside `overriding Cosmos source nodes <https://astronomer.github.io/astronomer-cosmos/configuration/render-config.html#customizing-how-nodes-are-rendered-experimental>`_ as sensors or another operator that allows them to skip the following branch of the DAG if the source is not fresh.
We noticed some Cosmos users use this feature alongside `overriding Cosmos source nodes <https://astronomer.github.io/astronomer-cosmos/guides/render-config.html#customizing-how-nodes-are-rendered-experimental>`_ as sensors or another operator that allows them to skip the following branch of the DAG if the source is not fresh.

This use case is not currently supported by the ``ExecutionMode.WATCHER``, since the ``dbt build`` command does not run `source freshness checks <https://docs.getdbt.com/reference/commands/build#source-freshness-checks>`_.

Expand Down Expand Up @@ -451,7 +451,7 @@ Asynchronous sensor execution

To disable asynchronous execution, set the ``deferrable`` flag to ``False`` in the ``operator_args``.

.. literalinclude:: ../../dev/dags/example_watcher.py
.. literalinclude:: ../../../../dev/dags/example_watcher.py
:language: python
:start-after: [START example_watcher_synchronous]
:end-before: [END example_watcher_synchronous]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Example: Using Callbacks with a Single Operator
To demonstrate how to specify a callback function for uploading files from the target directory, here’s an example
using a single operator in an Airflow DAG:

.. literalinclude:: ../../dev/dags/example_operators.py
.. literalinclude:: ../../../../dev/dags/example_operators.py
:language: python
:start-after: [START single_operator_callback]
:end-before: [END single_operator_callback]
Expand All @@ -46,7 +46,7 @@ You can leverage the :ref:`remote_target_path` configuration to upload files
from the target directory to a remote storage. Below is an example of how to define a callback helper function in your
``DbtDag`` that utilizes this configuration:

.. literalinclude:: ../../dev/dags/cosmos_callback_dag.py
.. literalinclude:: ../../../../dev/dags/cosmos_callback_dag.py
:language: python
:start-after: [START cosmos_callback_example]
:end-before: [END cosmos_callback_example]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.. _aws-container-run-job:

.. title:: Getting Started with Astronomer Cosmos on AWS ECS

Getting Started with Astronomer Cosmos on AWS ECS
==================================================

Expand Down
13 changes: 13 additions & 0 deletions docs/guides/run_dbt/container/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Run dbt in a container
======================

.. toctree::
:maxdepth: 1
:caption: Run dbt in a container

docker
kubernetes
watcher-kubernetes-execution-mode
aws-container-run-job
azure-container-instance
gcp-cloud-run-job
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Additional KubernetesPodOperator parameters can be added to the ``operator_args`

For instance,

.. literalinclude:: ../../dev/dags/jaffle_shop_kubernetes.py
.. literalinclude:: ../../../../dev/dags/jaffle_shop_kubernetes.py
:language: python
:start-after: [START kubernetes_tg_example]
:end-before: [END kubernetes_tg_example]
Expand Down Expand Up @@ -161,7 +161,7 @@ The Kubernetes execution mode has the following limitations:
- Does not emit Airflow datasets, assets, and dataset aliases (there is an `open ticket #2329 <https://github.com/astronomer/astronomer-cosmos/issues/2329>`__ to address this)
- Does not handle installing dbt deps for users (there is an `open ticket #679 <https://github.com/astronomer/astronomer-cosmos/issues/679>`__ to address this)
- Does not support `ProfileMapping <https://astronomer.github.io/astronomer-cosmos/profiles/index.html#using-a-profile-mapping>`_ (there is an `open ticket #749 <https://github.com/astronomer/astronomer-cosmos/issues/749>`__ to address this)
- Does not support `Callbacks <https://astronomer.github.io/astronomer-cosmos/configuration/callbacks.html>`_ (there is an `open ticket #1575 <https://github.com/astronomer/astronomer-cosmos/issues/1575>`__ to address this)
- Does not expose Compiled SQL as a `templated field <https://astronomer.github.io/astronomer-cosmos/configuration/compiled-sql.html>`_
- Does not benefit from `Cosmos caching mechanisms <https://astronomer.github.io/astronomer-cosmos/configuration/caching.html>`_
- Does not support `generating dbt docs & uploading to an object store <https://astronomer.github.io/astronomer-cosmos/configuration/generating-docs.html>`_ (there is a `PR <https://github.com/astronomer/astronomer-cosmos/pull/2058>`_ to solve this for S3)
- Does not support `Callbacks <https://astronomer.github.io/astronomer-cosmos/guides/callbacks.html>`_ (there is an `open ticket #1575 <https://github.com/astronomer/astronomer-cosmos/issues/1575>`__ to address this)
- Does not expose Compiled SQL as a `templated field <https://astronomer.github.io/astronomer-cosmos/guides/compiled-sql.html>`_
- Does not benefit from `Cosmos caching mechanisms <https://astronomer.github.io/astronomer-cosmos/guides/caching.html>`_
- Does not support `generating dbt docs & uploading to an object store <https://astronomer.github.io/astronomer-cosmos/guides/generating-docs.html>`_ (there is a `PR <https://github.com/astronomer/astronomer-cosmos/pull/2058>`_ to solve this for S3)
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Example DAG

Below is a complete example of a DAG using ``ExecutionMode.WATCHER_KUBERNETES``:

.. literalinclude:: ../../dev/dags/jaffle_shop_watcher_kubernetes.py
.. literalinclude:: ../../../../dev/dags/jaffle_shop_watcher_kubernetes.py
:language: python

-------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ By adding Airflow configurations under **cosmos** in the **meta** field, you can
For example, in the YAML above, the **pool** setting is applied to the specific dbt task.
This approach allows for more granular control over Airflow settings per task within your dbt model definitions.

.. image:: ../_static/custom_airflow_pool.png
.. image:: ../../../_static/custom_airflow_pool.png
:alt: Result of applying Custom Airflow Pool
11 changes: 11 additions & 0 deletions docs/guides/run_dbt/customization/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Additional Customization
========================

.. toctree::
:maxdepth: 1
:caption: Additional Customization

scheduling
operator-args
partial-parsing
custom-airflow-properties
Loading