-
Notifications
You must be signed in to change notification settings - Fork 123
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-2005198, SNOW-2014106: Add support for DataFrame/Series.create_or_replace_view #3198
Conversation
0dd7a41
to
41a6831
Compare
@@ -44,6 +44,7 @@ Series | |||
Series.to_snowflake | |||
Series.to_snowpark | |||
Series.cache_result | |||
Series.create_or_replace_view |
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.
what is the view for a Series? will it be just a view with only 1 row (or column) ?
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.
The view definition will be a query selecting the one data column of the series plus one or more index columns. But note that those columns could have been computed through more complex steps. For example, it may involve joining multiple tables, doing grouping and aggregation, etc until the final columns representing the series data and index columns are computed.
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.
But in general views have no rows. They are logical not physical.
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
6b00b90
to
7bbf448
Compare
7bbf448
to
00e934a
Compare
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.
Looks good.
statement_params: Optional[Dict[str, str]] = None, | ||
) -> List[Row]: | ||
""" | ||
Creates a view that captures the computation expressed by this DataFrame. |
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 think it would be good to clarify that creation of view doesn't involve computing output of the whole dataframe/series.
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 think this is well understood for views -- that it doesn't involve materialization. Also, it's good to stay consistent with the documentation of snowpark python.
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-2005198, SNOW-2014106
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Add support for DataFrame/Series.create_or_replace_view.