Skip to content

feat(snowflake): add support for GET statements#5019

Merged
VaggelisD merged 4 commits intotobymao:mainfrom
eruditmorina:eruditmorina/add-snowflake-get-support
Apr 29, 2025
Merged

feat(snowflake): add support for GET statements#5019
VaggelisD merged 4 commits intotobymao:mainfrom
eruditmorina:eruditmorina/add-snowflake-get-support

Conversation

@eruditmorina
Copy link
Contributor

Motivation

Hi folks, following up on #4813 in order to add support for GET statements in snowflake dialect similarly to the way PUT statements are being handled.

Changes

  • Add a GET expression and TokenType
  • Extend Snowflake Parser with _parse_get which parses GET statements to exp.Get, except for the case of unquoted file path (treated as exp.Command)
  • Tests to cover the functionality of get parsing

Thank you for the support 🙌

Copy link
Collaborator

@VaggelisD VaggelisD left a comment

Choose a reason for hiding this comment

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

Hey @eruditmorina, thank you for the contribution!

Left a few comments from my first pass:

@eruditmorina eruditmorina requested a review from VaggelisD April 29, 2025 12:00
Copy link
Collaborator

@VaggelisD VaggelisD left a comment

Choose a reason for hiding this comment

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

Just a couple more comments to consider from me and I think this is g2g

Copy link
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @eruditmorina!

@eruditmorina eruditmorina requested a review from VaggelisD April 29, 2025 12:45
Copy link
Collaborator

@VaggelisD VaggelisD left a comment

Choose a reason for hiding this comment

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

Awesome work, thank you for the contribution & quick iterations!

@VaggelisD VaggelisD merged commit f5358d8 into tobymao:main Apr 29, 2025
6 checks passed
@eruditmorina eruditmorina deleted the eruditmorina/add-snowflake-get-support branch April 29, 2025 12:52
@seeingskye
Copy link

seeingskye commented May 1, 2025

I started getting errors from sqlglot improperly parsing 'get' used in this context: https://docs.snowflake.com/en/sql-reference/functions/get
Could this be related to this latest change?

@tobymao
Copy link
Owner

tobymao commented May 2, 2025

8f77b30

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.

5 participants