snowflake.snowpark.functions.current_statement¶
- snowflake.snowpark.functions.current_statement() Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/functions.py#L443-L453)¶
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 >>> session.create_dataframe([1]).select(current_statement()).collect() [Row(CURRENT_STATEMENT()='SELECT current_statement() FROM ( SELECT "_1" FROM ( SELECT $1 AS "_1" FROM VALUES (1 :: INT)))')]