Reputation: 123
Does snowflake have function which returns name of the current stored procedure like the following in SQL Server.
SELECT OBJECT_NAME(@@PROCID)
I am just trying to build a logging table to log all statements that are executed inside a stored procedure this is for monitoring purpose i.e. which statement within stored procedure failed and how long queries are taking to run. If Snowflake has something out-of-box OR a recommended way of doing it please share.
Upvotes: 2
Views: 1621
Reputation: 1434
Try this from within your stored procedure:
const procName = Object.keys(this)[0];
Also see this related post.
Upvotes: 2