Skip to content

Commit ac819d3

Browse files
feat: [SNOW-1890085] remove execute_in_warehouse option
1 parent eb8ab12 commit ac819d3

File tree

3 files changed

+0
-40
lines changed

3 files changed

+0
-40
lines changed

src/snowflake/cli/_plugins/dbt/commands.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ def deploy_dbt(
7777
None,
7878
help="dbt-snowflake adapter version to be used",
7979
),
80-
execute_in_warehouse: Optional[str] = typer.Option(
81-
None, help="Warehouse to use when running `dbt execute` commands"
82-
),
8380
**options,
8481
) -> CommandResult:
8582
"""
@@ -95,7 +92,6 @@ def deploy_dbt(
9592
name,
9693
dbt_version,
9794
dbt_adapter_version,
98-
execute_in_warehouse,
9995
force=force,
10096
)
10197
)

src/snowflake/cli/_plugins/dbt/manager.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def deploy(
4545
name: FQN,
4646
dbt_version: Optional[str],
4747
dbt_adapter_version: str,
48-
execute_in_warehouse: Optional[str],
4948
force: bool,
5049
) -> SnowflakeCursor:
5150
dbt_project_path = path / "dbt_project.yml"
@@ -84,8 +83,6 @@ def deploy(
8483

8584
if dbt_adapter_version:
8685
query += f"\nDBT_ADAPTER_VERSION='{dbt_adapter_version}'"
87-
if execute_in_warehouse:
88-
query += f"\nWAREHOUSE='{execute_in_warehouse}'"
8986
return self.execute_query(query)
9087

9188
def execute(self, dbt_command: str, name: str, run_async: bool, *dbt_cli_args):

tests/dbt/test_dbt_commands.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
from __future__ import annotations
1616

17-
from textwrap import dedent
1817
from unittest import mock
1918

2019
import pytest
@@ -182,38 +181,6 @@ def test_force_flag_uses_create_or_replace(
182181
"CREATE OR REPLACE DBT PROJECT"
183182
)
184183

185-
@mock.patch("snowflake.cli._plugins.dbt.manager.StageManager.put_recursive")
186-
@mock.patch("snowflake.cli._plugins.dbt.manager.StageManager.create")
187-
def test_execute_in_warehouse(
188-
self,
189-
_mock_create,
190-
_mock_put_recursive,
191-
mock_connect,
192-
runner,
193-
dbt_project_path,
194-
mock_exists,
195-
):
196-
197-
result = runner.invoke(
198-
[
199-
"dbt",
200-
"deploy",
201-
"TEST_PIPELINE",
202-
f"--source={dbt_project_path}",
203-
"--dbt-adapter-version=3.4.5",
204-
"--execute-in-warehouse=XL",
205-
]
206-
)
207-
208-
assert result.exit_code == 0, result.output
209-
assert mock_connect.mocked_ctx.get_query() == dedent(
210-
"""CREATE DBT PROJECT TEST_PIPELINE
211-
FROM @MockDatabase.MockSchema.dbt_TEST_PIPELINE_stage
212-
DBT_VERSION='1.2.3'
213-
DBT_ADAPTER_VERSION='3.4.5'
214-
WAREHOUSE='XL'"""
215-
)
216-
217184
def test_raises_when_dbt_project_is_not_available(
218185
self, dbt_project_path, mock_connect, runner
219186
):

0 commit comments

Comments
 (0)