diff --git a/src/snowflake/snowpark/session.py b/src/snowflake/snowpark/session.py index a6448b59af..68d376e1b7 100644 --- a/src/snowflake/snowpark/session.py +++ b/src/snowflake/snowpark/session.py @@ -3269,6 +3269,24 @@ def get_session_stage( These artifacts include libraries and packages for UDFs that you define in this session via :func:`add_import`. + The return value is a Snowflake stage reference beginning with ``@``, + not a local directory or the contents of a file. Pass it to file + operations such as :meth:`FileOperation.put` to upload artifacts to + Snowflake. Treat this session-scoped temporary storage as disposable, + not as a permanent location for application data. + + Example:: + + >>> stage = session.get_session_stage() # doctest: +SKIP + >>> stage.startswith("@") # doctest: +SKIP + True + >>> session.get_session_stage() == stage # doctest: +SKIP + True + + The stage name is generated by Snowpark, so don't hardcode the name + returned by another session. The first call can create a temporary + stage in Snowflake and requires a connection with appropriate privileges. + Note: This temporary stage is created once under the current database and schema of a Snowpark session. Therefore, if you switch database or schema during the session, the stage will not be re-created