Giter VIP home page Giter VIP logo

Comments (5)

sfc-gh-sfan avatar sfc-gh-sfan commented on May 20, 2024

@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.

krish-adi avatar krish-adi commented on May 20, 2024

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)

https://docs.snowflake.com/en/developer-guide/snowpark/reference/python/_autosummary/snowflake.snowpark.html#snowflake.snowpark.Session

from snowpark-python.

sfc-gh-sfan avatar sfc-gh-sfan commented on May 20, 2024

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:

For more information about Snowflake Python stored procedures, see `Python stored procedures <https://docs.snowflake.com/en/sql-reference/stored-procedures-python.html>`__.

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.

krish-adi avatar krish-adi commented on May 20, 2024

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.

sfc-gh-sfan avatar sfc-gh-sfan commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.