Snowflake scripting in SQL seems to be in preview and I have decided to have a play with it. Given how new it is there is limited documentation so I am using a combination of what I can find on the Snowflake site and the odd blog that has been written about it. There appear to be a few quirks, at least when compared to Oracle PL/SQL (though that has been round for years). How many of these are intentional and how many are things to be ironed out I don't know. You can see the procedure I have created it: Accepts an id as a parameter Creates a result set selecting from a table, using the parameter as a filter Loads the results set into a cursor. Loops through the cursor loading the id in the cursor into variable Calls procedure passing in the variable as the parameter. Then as a proof of concept I tried the Snowflake feature of allowing declaration of variables within the main start and end block.
Posts on Gen AI, Data Warehousing, automation, DBs, ETL tools, tuning and streamlining.