Skip to content

Commit

Permalink
Docs fix: add execution config to MWAA code example (#667) (#674)
Browse files Browse the repository at this point in the history
Add execution config to MWAA code example document.

Closes: #667
  • Loading branch information
ugmuka authored Nov 15, 2023
1 parent ee91ece commit 773fa27
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/getting_started/mwaa.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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(
"<my_dbt_project>",
),
profile_config=profile_config,
execution_config=execution_config,
# normal dag parameters
schedule_interval="@daily",
start_date=datetime(2023, 1, 1),
Expand Down

0 comments on commit 773fa27

Please sign in to comment.