You are viewing documentation about an older version (1.8.0). View latest version

snowflake.snowpark.functions.getvariable¶

snowflake.snowpark.functions.getvariable(name: str) → Column[source]¶

Retrieves the value of a session variable by its name.

Parameters:

name (str) – The name of the session variable to retrieve.

Returns:

A Snowflake Column object representing the value of the specified session variable.

Return type:

Column

Example::
>>> result = session.create_dataframe([1]).select(getvariable("MY_VARIABLE").alias("RESULT")).collect()
>>> assert result[0]["RESULT"] is None
Copy