Automate grants on Procedures and Functions in Snowflake procedure
I am running the following procedure to obtain the SQL for grants to roles on a database:
In Snowflake, Best Practice of using : LAST_QUERY_ID() vs. Cursors for Capturing intermediate result in Snowflake Stored Procedures
I’m relatively new to Snowflake and currently working with stored procedures in SQL. In my procedures, I dynamically execute insert and update queries using EXECUTE IMMEDIATE :InsertSQL
. To capture the number of rows inserted, I’ve been using SELECT $1 INTO insertcount FROM TABLE(RESULT_SCAN(LAST_QUERY_ID()));
after each dynamic execution.
In Snowflake, Best Practice for Capturing Inserted Row Count in Snowflake Stored Procedures: LAST_QUERY_ID() vs. Cursors
I’m relatively new to Snowflake and currently working with stored procedures in SQL. In my procedures, I dynamically execute insert and update queries using EXECUTE IMMEDIATE :InsertSQL
. To capture the number of rows inserted, I’ve been using SELECT $1 INTO insertcount FROM TABLE(RESULT_SCAN(LAST_QUERY_ID()));
after each dynamic execution.
Stored procedure to do a data validation (files available in blob)
I want to write a stored procedure in Snowflake to do the below activity.-