snowflake.snowpark.functions.current_session

snowflake.snowpark.functions.current_session() Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L330-L340)

Returns a unique system identifier for the Snowflake session corresponding to the present connection. This will generally be a system-generated alphanumeric string. It is NOT derived from the user name or user account.

Example

>>> # Return result is tied to session, so we only test if the result exists
>>> result = session.create_dataframe([1]).select(current_session()).collect()
>>> assert result[0]['CURRENT_SESSION()'] is not None
Copy
语言: 中文