Skip to content

feat(snowflake): support properties before column definitions in CREATE statements#7787

Merged
geooo109 merged 4 commits into
tobymao:mainfrom
eruditmorina:support-crate-props-before-cols
Jun 24, 2026
Merged

feat(snowflake): support properties before column definitions in CREATE statements#7787
geooo109 merged 4 commits into
tobymao:mainfrom
eruditmorina:support-crate-props-before-cols

Conversation

@eruditmorina

Copy link
Copy Markdown
Contributor

Summary

Snowflake, in CREATE statements, accepts KEY = VALUE properties both after and before the column definitions, example:

CREATE TABLE t CHANGE_TRACKING=TRUE (id INT);
CREATE TABLE t (id INT) CHANGE_TRACKING=TRUE;

Both versions of the above example are valid, but currently passing parameters before column definitions fail to parse. This PR aims to fix this by overriding _parse_property_before to parse such properties.

As usual, happy to receive feedback and guidance to follow up.

@geooo109 geooo109 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR nice work, let's refactor it using my suggestion.

Comment thread sqlglot/parsers/snowflake.py Outdated
Comment thread sqlglot/parsers/snowflake.py Outdated
@eruditmorina eruditmorina requested a review from geooo109 June 24, 2026 13:28

@geooo109 geooo109 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, great work!

@geooo109 geooo109 merged commit 523f7c2 into tobymao:main Jun 24, 2026
8 checks passed
@eruditmorina eruditmorina deleted the support-crate-props-before-cols branch June 24, 2026 15:19
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.

3 participants