snowflake.snowpark.context.get_active_session

snowflake.snowpark.context.get_active_session() Session[source]

Returns the current active Snowpark session.

Raises: SnowparkSessionException: If there is more than one active session or no active sessions.

Returns:

A Session object for the current session.