Skip to content

Snowflake engine does not support fulle range of characters in role/warehouse identifiers #685

@marc-marketparts

Description

@marc-marketparts

If you use special characters like dot "." in either a role or a warehouse name, SQITCH will fail executing USE ROLE <role_name>, or USE WAREHOUSE <warehouse_name>.

As stated on Snowflake docs, identifiers can include a wide range of characters in object identifiers if they are quoted.

So far, the Sqitch snowflake engine supports unquoted identifiers only.

($role ? ("USE ROLE $role") : ()),
"ALTER WAREHOUSE $wh RESUME IF SUSPENDED",
"USE WAREHOUSE $wh",
'USE SCHEMA ' . $self->registry,

The solution could be :

  • quoting the role or warehouse name in the code above systematically, with a small regression for users who did not set their SQITCH role/warehouse names with the right case (quoted identifiers are case sensistive, unquoted ones case insensitive)
  • detect if the role/warehouse names have to be quoted or not, and quote them or not accordingly.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions