Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions cosmos/operators/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def __init__(
self.compiled_sql = ""
self.should_store_compiled_sql = should_store_compiled_sql
self.openlineage_events_completes: list[RunEvent] = []
kwargs.pop("full_refresh", None) # usage of this param should be implemented in child classes
super().__init__(**kwargs)

@cached_property
Expand Down
5 changes: 4 additions & 1 deletion dev/dags/basic_cosmos_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
DBT_ROOT_PATH / "jaffle_shop",
),
profile_config=profile_config,
operator_args={"install_deps": True},
operator_args={
"install_deps": True, # install any necessary dependencies before running any dbt command
"full_refresh": True, # used only in dbt commands that support this flag
},
# normal dag parameters
schedule_interval="@daily",
start_date=datetime(2023, 1, 1),
Expand Down
1 change: 1 addition & 0 deletions tests/operators/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ def test_store_compiled_sql() -> None:
[
(DbtSeedLocalOperator, {"full_refresh": True}, {"context": {}, "cmd_flags": ["--full-refresh"]}),
(DbtRunLocalOperator, {"full_refresh": True}, {"context": {}, "cmd_flags": ["--full-refresh"]}),
(DbtTestLocalOperator, {"full_refresh": True}, {"context": {}}),
(
DbtRunOperationLocalOperator,
{"args": {"days": 7, "dry_run": True}, "macro_name": "bla"},
Expand Down