Back to Browse

Snowflake Scripting Block Structure For Stored Procedures & Anonymous Blocks

10.1K views
Dec 5, 2023
16:54

Block structures serve as containers for both Snowflake script and SQL scripting, providing a platform for encapsulation and execution. These structures can either be anonymous or attached to a stored procedure, and that's precisely what we'll delve into in this video. We'll explore both the theoretical and practical aspects of block structures, demonstrating how to compose straightforward Snowflake scripts and troubleshoot them by intentionally introducing errors using our Snowsight WebUI. Upon completion of the "Snowflake Scripting Block Structure For Stored Procedures & Anonymous Blocks" chapter, you'll gain the knowledge to address the following questions: 1. What does the block structure look like, and what are its crucial sections? 2. Which section of the block is optional, and which one is mandatory? 3. Is it possible to write an empty anonymous block using Snowflake Scripting? 🚀🚀 How To Connect ✏ Instagram: https://www.instagram.com/learn_dataengineering/ ✏ Medium Blog: https://medium.com/@data-engineering-simplified ✏ Exclusive Snowflake Facebook Group: https://www.facebook.com/groups/627874916138090/ 🚀🚀 Chapters ➥ 00:00 Introduction ➥ 00:31 Scope of the video ➥ 01:12 Welcome Note ➥ 02:31 Snowflake Scripting Block Structure ➥ 03:27 Snowflake Scripting Stored Procedure Structure ➥ 04:26 First Anonymous Block Example ➥ 06:05 First Stored Procedure Example With SQL Script ➥ 07:00 Anonymous Block Without Declare ➥ 07:38 Debugging Approach ➥ 09:20 Empty Block Structure ➥ 10:12 Upper vs Lower Case Block Keywords ➥ 12:00 Snowflake Scripting & SnowSQL CLI ➥ 13:57 Anonymous Block With Double Dollar In WebUI ➥ 15:42 Summary & What Next ➥ 16:24 Thank You Note 🚀🚀 Snowflake Stored Procedure Playlist https://www.youtube.com/playlist?list=PLba2xJ7yxHB5NksIHMPirkHhOoEG3-K09 ✏ Ch-01 Snowflake Scripting For Stored Procedure Introduction https://youtu.be/-BhYp0X00P0 ✏ Ch-02 Stored Procedures Are Anti-Pattern https://youtu.be/rBwknyABYMU ✏ Ch-03 Snowflake Scripting Block Structure https://youtu.be/yBaUbCFSMjM ✏ Ch-04 How To Declare Variable https://youtu.be/CyJ9LPFMhwc ✏ Ch-05 Declare & Define Local Variables https://youtu.be/pBDeMog56AQ ✏ Ch-06 How To Use Variables https://youtu.be/U2gbypinWZs ✏ Ch-07 Multiple Variable Assignment https://youtu.be/HlrcLrbPpD0 ✏ Ch-08 Variable Visibility in nested block https://youtu.be/TvzTr8HPdtM ✏ Ch-09 Return Value/Expression/Table From Stored Proc https://youtu.be/Gl0x4yxz_Ok ✏ Ch-10 IF ELSEIF ELSE IF-END https://youtu.be/dmybW_lQuGA ✏ Ch-11 CASE/WHEN Conditional Logic https://youtu.be/oRzIqDvhyWU ✏ Ch-12 FOR Loop https://youtu.be/UzKb_TGtqpg ✏ Ch-13 WHILE Loop https://youtu.be/Q5UU5h7jdNU ✏ Ch-14 REPEAT Loop https://youtu.be/eNovcmu4Qk4 ✏ Ch-15 Work With CURSOR Object https://youtu.be/MIy3k5SzqYk ✏ Ch-16 Param Binding & CURSOR Object https://youtu.be/MIy3k5SzqYk ✏ Ch-17 Work With RESULTSET Object https://youtu.be/MIy3k5SzqYk ✏ Ch-18 Exception Handling In Stored Procedure https://youtu.be/mP-PqZsl4b8 #storedprocedure #snowflakecomputing #snowflakedatawrehouse #snowflake #dataengineeringsimplifed #DESimplified #dataengineering #clouddatawarehouse Disclaimer: All snowflake-related learning materials and tutorial videos published in this channel are the personal opinions of the data engineering simplified team and they're neither authorized by nor associated with Snowflake, Inc.

Download

1 formats

Video Formats

360pmp427.0 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.