SNOW-2005198, SNOW-2014106: Add support for DataFrame/Series.create_or_replace_view#3198
SNOW-2005198, SNOW-2014106: Add support for DataFrame/Series.create_or_replace_view#3198sfc-gh-helmeleegy merged 3 commits intomainfrom
Conversation
0dd7a41 to
41a6831
Compare
| Series.to_snowflake | ||
| Series.to_snowpark | ||
| Series.cache_result | ||
| Series.create_or_replace_view |
There was a problem hiding this comment.
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.
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.
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
| 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.
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.
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.