Having not created stored procedures in Snowflake before I wanted to give it a go. My preference is for the more newly released SQL style procedures over the Javascript ones, though I fully intend to give them a stab as well. Below is the code I used to create said my first Snowflake Procedure. This procedure just takes in a table name and returns the count of rows in said table. Not overly useful but for me it has some useful proof of concepts, not only how to create a basic procedure in Snowflake but also how to run dynamic SQL Have a look through the code and feel free to ask any questions
Here is proof it works with me running the procedure and it producing the correct result.
Comments
Post a Comment