Comments (5)
@krish-adi: Creating temp object Creating named temp object is not allowed inside a stored procedure is not supported today. The auto generated temp object by snowpark itself is allowed.
from snowpark-python.
Ah, okay! Then there needs to be an update to the documentation. This is what it shows currently:
write_pandas(df: DataFrame, table_name: str, *, database: Optional[str] = None, schema: Optional[str] = None, chunk_size: Optional[int] = None, compression: str = 'gzip', on_error: str = 'abort_statement', parallel: int = 4, quote_identifiers: bool = True, auto_create_table: bool = False, create_temp_table: bool = False, overwrite: bool = False)
from snowpark-python.
Hey thanks for the suggestions. You are right the docs should be improved, but probably not on the API side. On the API side we provided a link to stored proc for more information:
We'll add this limitation to the docs for stored proc instead: https://docs.snowflake.com/en/sql-reference/stored-procedures-python.html#limitations.
Also one thing I want to clarify is that creating named temp object is not allowed. The auto generated temp object by snowpark itself is allowed. I'll edit my previous comment as well.
from snowpark-python.
Could you elaborate on auto generated temp object? What does this imply and how do I generate this?
Could I use this approach to return a pandas DataFrame from a stored procedure?
from snowpark-python.
Those are the objects that is generated by snowpark under the hood. cache_result()
is one of those examples.
No you cannot. Those objects are supposed to live within the scope of a stored procedure. It is still suggested to use table or stage files if you want to persist result from a stored procedure.
from snowpark-python.
Related Issues (20)
- SNOW-928897: Calling SPROC throws error module has no attribute HOT 2
- SNOW-940613: Snowpark dataframe join fails with Invalid identifier when using dataframe alias HOT 1
- SNOW-944048: Support Polars with a to_polars method HOT 4
- SNOW-944062: Implementation and functionality of `pivot` differs from PySpark and is not user-friendly HOT 3
- SNOW-952961: Wrong documentation for daydiff function HOT 1
- SNOW-960172: Add `map_dict` functionality HOT 1
- SNOW-969175: Decimals with precision greater than 18 are returned as object type when using the to_pandas method
- SNOW-977836: The withColumnRenamed fucntion fails to rename a column if the snowpark dataframe has multiple columns with same name but with different case style HOT 2
- SNOW-992587: Unable to select metadata columns HOT 2
- SNOW-997694: Allow DataFrame object to be used as a subquery in filter operations
- SNOW-1000455: Incorrect return type hint in DataFrameNaFunctions class
- SNOW-1006168: Snowpark function `array_agg` converts data types to string HOT 1
- SNOW-1018951: save_as_table fails when writing DataFrame returned from stored procedure HOT 2
- SNOW-1021381: Deprecation warning for pkg_resources
- SNOW-1026241: Null value in integer column raises exception when executing .to_pandas() in version 1.12.0 HOT 1
- SNOW-1045584: Pylint (3.0.3) throws errors when using the `dataframe.collect()` method HOT 1
- SNOW-1055426: Typing breaks on pyright due to improper alias definitions
- SNOW-1058504: Python 3.12 support HOT 2
- SNOW-1062400: Failing to upload a pickled item from native app to a (non-temporary) stage
- SNOW-1062439: Automatically closing sessions and connections using Python `with` leads to errors when deploying to stored procedures HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snowpark-python.