Skip to content

Specify dialect as 'snowflake' in SQL parsing#179

Closed
arborluke wants to merge 1 commit into
Snowflake-Labs:mainfrom
arborluke:patch-1
Closed

Specify dialect as 'snowflake' in SQL parsing#179
arborluke wants to merge 1 commit into
Snowflake-Labs:mainfrom
arborluke:patch-1

Conversation

@arborluke
Copy link
Copy Markdown

@arborluke arborluke commented Mar 26, 2026

USE SECONDARY ROLE NONE is being returned by sqlglot as Unknown when its a valid Snowflake Use statement.

Statement type of Unknown is not allowed. Please review sql statement permissions in configuration file

If I run node = sqlglot.parse_one('USE SECONDARY ROLES NONE');print(type(node).__name__) it returns Unknown.

If I run node = sqlglot.parse_one('USE SECONDARY ROLES NONE', dialect='snowflake');print(type(node).__name__) it returns Use.

USE SECONDARY ROLE NONE is being returned by sqlglot as unknown when its a valid Snowflake USE statement.
@sfc-gh-twhite
Copy link
Copy Markdown
Collaborator

Thank you for raising this! This is a duplicate of #170 and #173. I've added a comment on #173 to consider using some of those test cases as well.

I'll close this now as we should be covered.

@arborluke
Copy link
Copy Markdown
Author

Pre-commit failed during the deploy :(

@sfc-gh-twhite
Copy link
Copy Markdown
Collaborator

Pre-commit failed during the deploy :(

It did 😢 There were a couple of ruff check violations and a typo, but fixed with #181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants