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

snowflake.snowpark.functions.current_statement

snowflake.snowpark.functions.current_statement() Column[source] (https://github.com/snowflakedb/snowpark-python/blob/release-v1.1.0/src/snowflake/snowpark/functions.py#L246-L255)

Returns the SQL text of the statement that is currently executing.

Example

>>> # Return result is tied to session, so we only test if the result exists
>>> result = session.create_dataframe([1]).select(current_statement()).collect()
>>> assert result is not None