Snowflake: Add support for CREATE DYNAMIC TABLE#1960
Merged
iffyio merged 5 commits intoapache:mainfrom Aug 20, 2025
Merged
Conversation
iffyio
reviewed
Jul 23, 2025
| fn parse_create_dynamic_table() { | ||
| snowflake().verified_stmt(r#"CREATE OR REPLACE DYNAMIC TABLE my_dynamic_table TARGET_LAG='20 minutes' WAREHOUSE=mywh AS SELECT product_id, product_name FROM staging_table"#); | ||
| snowflake() | ||
| .parse_sql_statements( |
Contributor
There was a problem hiding this comment.
For the usages of parse_sql_statements can we instead use snowflake().one_statement_parses_to(sql, canonical) in the cases that verified_stmt isnt applicable?
| } | ||
|
|
||
| #[test] | ||
| fn parse_create_dynamic_table() { |
Contributor
There was a problem hiding this comment.
Can we include scenarios for the BEFORE and RefreshMode variants? those don't seem to be covered by the existing tests?
c314bdd to
e6dbd03
Compare
iffyio
reviewed
Jul 24, 2025
| "CREATE DYNAMIC TABLE my_dynamic_table", | ||
| " TARGET_LAG='DOWNSTREAM'", | ||
| " WAREHOUSE=mywh", | ||
| " REFRESH_MODE=AUTO", |
Contributor
There was a problem hiding this comment.
Can we add similar coverage for REFRESH_MODE=FULL and REFRESH_MODE=INCREMENTAL?
e204357 to
d427a74
Compare
d427a74 to
23dd7c2
Compare
iffyio
approved these changes
Aug 20, 2025
Contributor
iffyio
left a comment
There was a problem hiding this comment.
LGTM! Thanks @yoavcloud!
cc @alamb
CREATE DYNAMIC TABLE
ayman-sigma
pushed a commit
to sigmacomputing/sqlparser-rs
that referenced
this pull request
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added support for
CREATE DYNAMIC TABLEin Snowflake:CreateTableBuilderwith new optionsCreateTableBuilder::validate_schema_infofunction and related tests because, in my opinion, it introduces semantic validation, which is out of scope for the parser.