From cbbb401ea8bc1519001c2b410359663e51083fb2 Mon Sep 17 00:00:00 2001 From: Yeoreum Song Date: Sat, 28 Mar 2026 17:41:00 +0900 Subject: [PATCH 1/6] docs: update dbt project path example for Airflow 3 Astro compatibility --- docs/getting_started/astro.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/getting_started/astro.rst b/docs/getting_started/astro.rst index 2c0845d0d1..0e60575211 100644 --- a/docs/getting_started/astro.rst +++ b/docs/getting_started/astro.rst @@ -67,15 +67,18 @@ Make a new folder, ``dbt``, inside your local project's ``dags`` folder. Then, c Note: your dbt projects can go anywhere on the Airflow image. By default, Cosmos looks in the ``/usr/local/airflow/dags/dbt`` directory, but you can change this by setting the ``dbt_project_dir`` argument when you create your DAG instance. -For example, if you wanted to put your dbt project in the ``/usr/local/airflow/dags/my_dbt_project`` directory, you would do: +For example, if you wanted to put your dbt project in a directory relative to your DAG file (for example, ``my_dbt_project``), you would do: .. code-block:: python + from pathlib import Path from cosmos import DbtDag, ProjectConfig my_cosmos_dag = DbtDag( project_config=ProjectConfig( - dbt_project_path="/usr/local/airflow/dags/my_dbt_project", + dbt_project_path=(Path(__file__).parent / "my_dbt_project") + .absolute() + .to_posix(), ), # ..., ) From e783c8b06a233c7e405acf8b335278daf5ae71fe Mon Sep 17 00:00:00 2001 From: Yeoreum Song Date: Sat, 28 Mar 2026 18:07:50 +0900 Subject: [PATCH 2/6] docs: fix path example syntax and use as_posix() --- docs/getting_started/astro.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting_started/astro.rst b/docs/getting_started/astro.rst index 0e60575211..3b07700faf 100644 --- a/docs/getting_started/astro.rst +++ b/docs/getting_started/astro.rst @@ -78,7 +78,7 @@ For example, if you wanted to put your dbt project in a directory relative to yo project_config=ProjectConfig( dbt_project_path=(Path(__file__).parent / "my_dbt_project") .absolute() - .to_posix(), + .as_posix(), ), # ..., ) From 3ef8025c75b88f6bb898d3bf3f2607d00850408e Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Mon, 30 Mar 2026 12:14:31 -0300 Subject: [PATCH 3/6] Apply suggestion from @tatiana --- docs/getting_started/astro.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting_started/astro.rst b/docs/getting_started/astro.rst index 3b07700faf..8fe4703df2 100644 --- a/docs/getting_started/astro.rst +++ b/docs/getting_started/astro.rst @@ -65,7 +65,7 @@ Make a new folder, ``dbt``, inside your local project's ``dags`` folder. Then, c ├── requirements.txt └── ... -Note: your dbt projects can go anywhere on the Airflow image. By default, Cosmos looks in the ``/usr/local/airflow/dags/dbt`` directory, but you can change this by setting the ``dbt_project_dir`` argument when you create your DAG instance. +Note: dbt projects can be placed anywhere in the Airflow image or mounted independently via the `astro dbt deploy `__ command. You can customise where the dbt project is by setting the ``dbt_project_path`` parameter on ``ProjectConfig`` when you create your DAG instance. For example, if you wanted to put your dbt project in a directory relative to your DAG file (for example, ``my_dbt_project``), you would do: From 8b236f2f2cd8c5b88363df13ae8cb7ad3efc7f04 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Mon, 30 Mar 2026 12:18:59 -0300 Subject: [PATCH 4/6] Update docs/getting_started/astro.rst --- docs/getting_started/astro.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting_started/astro.rst b/docs/getting_started/astro.rst index 8fe4703df2..6aa833c5fd 100644 --- a/docs/getting_started/astro.rst +++ b/docs/getting_started/astro.rst @@ -76,7 +76,7 @@ For example, if you wanted to put your dbt project in a directory relative to yo my_cosmos_dag = DbtDag( project_config=ProjectConfig( - dbt_project_path=(Path(__file__).parent / "my_dbt_project") + dbt_project_path=(Path(__file__).parent / "dbt/my_dbt_project") .absolute() .as_posix(), ), From dd612be1fc28e09ff8de71b5c0d10f8d77950adb Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Mon, 30 Mar 2026 12:21:33 -0300 Subject: [PATCH 5/6] Apply suggestion from @tatiana --- docs/getting_started/astro.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting_started/astro.rst b/docs/getting_started/astro.rst index 6aa833c5fd..8c2af68232 100644 --- a/docs/getting_started/astro.rst +++ b/docs/getting_started/astro.rst @@ -67,7 +67,7 @@ Make a new folder, ``dbt``, inside your local project's ``dags`` folder. Then, c Note: dbt projects can be placed anywhere in the Airflow image or mounted independently via the `astro dbt deploy `__ command. You can customise where the dbt project is by setting the ``dbt_project_path`` parameter on ``ProjectConfig`` when you create your DAG instance. -For example, if you wanted to put your dbt project in a directory relative to your DAG file (for example, ``my_dbt_project``), you would do: +For example, if you wanted to put your dbt project in a directory relative to your DAG file (for example, ``dbt/my_dbt_project``), you would do: .. code-block:: python From bf7f18d094b137abeabacdd21f0649f4d383051e Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Mon, 30 Mar 2026 12:22:10 -0300 Subject: [PATCH 6/6] Update docs/getting_started/astro.rst Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/getting_started/astro.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting_started/astro.rst b/docs/getting_started/astro.rst index 8c2af68232..3632cda252 100644 --- a/docs/getting_started/astro.rst +++ b/docs/getting_started/astro.rst @@ -67,7 +67,7 @@ Make a new folder, ``dbt``, inside your local project's ``dags`` folder. Then, c Note: dbt projects can be placed anywhere in the Airflow image or mounted independently via the `astro dbt deploy `__ command. You can customise where the dbt project is by setting the ``dbt_project_path`` parameter on ``ProjectConfig`` when you create your DAG instance. -For example, if you wanted to put your dbt project in a directory relative to your DAG file (for example, ``dbt/my_dbt_project``), you would do: +For example, if you wanted to put your dbt project in a directory relative to your DAG file (for example, ``dbt/my_dbt_project``, corresponding to ``dags/dbt/my_dbt_project`` in your project), you would do: .. code-block:: python