-
Notifications
You must be signed in to change notification settings - Fork 116
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
SNOW-1010216: Support more option for create or replace dynamic table #2110
SNOW-1010216: Support more option for create or replace dynamic table #2110
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any tests that can be added for these new parameters?
Co-authored-by: Jamison Rose <[email protected]>
Sorry. I was in the process of adding more tests. I have pushed the tests to cover all new cases now. |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
name, | ||
warehouse, | ||
lag, | ||
comment, | ||
replace, | ||
if_not_exists, | ||
refresh_mode, | ||
initialize, | ||
clustering_keys, | ||
is_transient, | ||
data_retention_time, | ||
max_data_extension_time, | ||
x, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest you use named arguments. Positional arguments are error prone when there are so many arguments.
CHANGELOG.md
Outdated
@@ -6,6 +6,14 @@ | |||
|
|||
#### New Features | |||
- Added support for `snowflake.snowpark.testing.assert_dataframe_equal` that is a util function to check the equality of two Snowpark DataFrames. | |||
- Added support for specifying the following attributes when create `DataFrame.create_or_replace_dynamic_table`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added support for specifying the following parameters to DataFrame.create_or_replace_dynamic_table()
return ( | ||
CREATE | ||
+ OR | ||
+ REPLACE | ||
+ replace_sql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about changing to format string instead of +
?
@@ -3435,7 +3444,28 @@ def create_or_replace_dynamic_table( | |||
lag: specifies the target data freshness | |||
comment: Adds a comment for the created table. See | |||
`COMMENT <https://docs.snowflake.com/en/sql-reference/sql/comment>`_. | |||
mode: Specifies the behavior of create dynamic table. Allowed values are: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does a dynamic table have truncate
? I guess no. Just to double confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not support it in the create or replace dynamic table api. Here we map
overwrite = CREATE OR REPLACE DYNAMIC TABLE
errorifexists = CREATE DYNAMIC TABLE
ignore = CREATE DYNAMIC TABLE IF NOT EXISTS
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1010216, SNOW-1569878: Creating Dynamic Table using Snowpark does not support all options #2019
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Adding support to specify the following: