diff --git a/docs/getting_started/mwaa.rst b/docs/getting_started/mwaa.rst index f7a569302..726cf0cb8 100644 --- a/docs/getting_started/mwaa.rst +++ b/docs/getting_started/mwaa.rst @@ -87,8 +87,9 @@ In your ``my_cosmos_dag.py`` file, import the ``DbtDag`` class from Cosmos and c .. code-block:: python - from cosmos import DbtDag, ProjectConfig, ProfileConfig + from cosmos import DbtDag, ProjectConfig, ProfileConfig, ExecutionConfig from cosmos.profiles import PostgresUserPasswordProfileMapping + from cosmos.constants import ExecutionMode profile_config = ProfileConfig( profile_name="default", @@ -99,11 +100,17 @@ In your ``my_cosmos_dag.py`` file, import the ``DbtDag`` class from Cosmos and c ), ) + execution_config = ExecutionConfig( + dbt_executable_path=f"{os.environ['AIRFLOW_HOME']}/dbt_venv/bin/dbt", + execution_mode=ExecutionMode.VIRTUALENV, + ) + my_cosmos_dag = DbtDag( project_config=ProjectConfig( "", ), profile_config=profile_config, + execution_config=execution_config, # normal dag parameters schedule_interval="@daily", start_date=datetime(2023, 1, 1),