LAST_QUERY_ID (Lakehouse v1)
Returns the last query ID of query in current session, index can be (-1, 1, 1+2)…, out of range index will return empty string.
Analyze Syntax
Section titled “Analyze Syntax”func.last_query_id(<index>)Analyze Examples
Section titled “Analyze Examples”func.last_query_id(-1)
┌──────────────────────────────────────┐│ func.last_query_id((- 1)) │├──────────────────────────────────────┤│ a6f615c6-5bad-4863-8558-afd01889448c │└──────────────────────────────────────┘SQL Syntax
Section titled “SQL Syntax”LAST_QUERY_ID(<index>)SQL Examples
Section titled “SQL Examples”SELECT LAST_QUERY_ID(-1);
┌──────────────────────────────────────┐│ last_query_id((- 1)) │├──────────────────────────────────────┤│ a6f615c6-5bad-4863-8558-afd01889448c │└──────────────────────────────────────┘