Skip to content
Draft
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 RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
## Fixes and improvements
* Fixed `SELECT *` output being corrupted when joined tables share column names. Duplicate column names are now disambiguated by appending a numeric suffix (e.g. `NAME`, `NAME_2`).
* Fixed `snow connection generate-jwt` and `snow connection generate-workload-identity-token` failing with `Connection None is not configured` when used with `--temporary-connection`.
* `snow dcm list-deployments` and `snow dcm drop-deployment` now wrap the project name in `IDENTIFIER(...)`, matching every other DCM subcommand. Fully-qualified and quoted project names are now handled consistently.


# v3.17.0
Expand Down
4 changes: 2 additions & 2 deletions src/snowflake/cli/_plugins/dcm/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def list_deployments(self, project_identifier: FQN) -> SnowflakeCursor:
"Running DCM list-deployments manager operation (project_identifier=%s).",
project_identifier,
)
query = f"SHOW DEPLOYMENTS IN DCM PROJECT {project_identifier.identifier}"
query = f"SHOW DEPLOYMENTS IN DCM PROJECT {project_identifier.sql_identifier}"
return self.execute_query(query=query)

def drop_deployment(
Expand All @@ -165,7 +165,7 @@ def drop_deployment(
project_identifier,
if_exists,
)
query = f"ALTER DCM PROJECT {project_identifier.identifier} DROP DEPLOYMENT"
query = f"ALTER DCM PROJECT {project_identifier.sql_identifier} DROP DEPLOYMENT"
if if_exists:
query += " IF EXISTS"
query += f' "{deployment_name}"'
Expand Down
4 changes: 2 additions & 2 deletions tests/dcm/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def test_list_deployments(mock_execute_query):
mgr.list_deployments(project_identifier=TEST_PROJECT)

mock_execute_query.assert_called_once_with(
query="SHOW DEPLOYMENTS IN DCM PROJECT my_project"
query="SHOW DEPLOYMENTS IN DCM PROJECT IDENTIFIER('my_project')"
)


Expand All @@ -339,7 +339,7 @@ def test_drop_deployment(mock_execute_query, if_exists):
project_identifier=TEST_PROJECT, deployment_name="v1", if_exists=if_exists
)

expected_query = "ALTER DCM PROJECT my_project DROP DEPLOYMENT"
expected_query = "ALTER DCM PROJECT IDENTIFIER('my_project') DROP DEPLOYMENT"
if if_exists:
expected_query += " IF EXISTS"
expected_query += ' "v1"'
Expand Down
Loading