Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Syntax error when Snowflake role name includes special characters such as hyphens #215

Closed
jonathancisneros opened this issue Jan 2, 2024 · 4 comments · May be fixed by #216
Closed
Labels
bug Something isn't working

Comments

@jonathancisneros
Copy link

The USE ROLE and the other USE query template strings here:
https://github.com/Snowflake-Labs/schemachange/blob/master/schemachange/cli.py#L213

are not using quoted values for the placeholder values, if there are special characters in the name of those values, the execution of the reset_session function fails with SQL compilation or syntax error.

please update the USE xxx template strings to support special characters by using quoted values like this:
_q_set_sess_role = 'USE ROLE "{role}";'

@dwelden
Copy link

dwelden commented Feb 1, 2024

Duplicate of #186?

@sfc-gh-tmathew
Copy link
Collaborator

Thank you for highlighting this gap @dwelden @jonathancisneros

Just released 3.7.0 that addressed roles with special characters. Please test it out and let us know if this issue can be closed.

@dwelden
Copy link

dwelden commented Aug 1, 2024

This issue is resolved.

@sfc-gh-tmathew
Copy link
Collaborator

Thank you @dwelden for confirming. Closing this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants