snowflake.snowpark.functions.last_query_id¶
- snowflake.snowpark.functions.last_query_id(num: Union[snowflake.snowpark.column.Column, str] = None) Column[source]¶
Returns the query ID of the last statement executed in the current session. If num is specified, returns the query ID of the nth statement executed in the current session.
- Parameters:
num (ColumnOrName, optional) – The number of statements back to retrieve the query ID for. If None, returns the query ID of the last statement.
- Returns:
The query ID as a string.
- Return type:
Example: