03 Apr 20 · snowflake-user77 · #Snowflake ·   Bookmark   ×

Insert LAST_QUERY_ID value while inserting data in a table via stored proc in Snowflake

Hi All,

I'm inserting data into Snowflake table via stored proc. I have a column in table where i want to capture the query id when the insert statement will run. Any suggestions how this can be achieved?



posted on 03 Apr 20

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds

LAST_QUERY_ID is generated / available after the query is executed. So, once the insert is complete, add a second line, where you update the column in the table with the LAST_QUERY_ID() value

Community Software by Hittly