From the course: Introduction to Modern Data Engineering with Snowflake
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Computations with user-defined functions - Snowflake Tutorial
From the course: Introduction to Modern Data Engineering with Snowflake
Computations with user-defined functions
Naturally, it's not very scalable to perform data transformations manually every single time. And as I mentioned earlier, there's a good chance that in practice, you'll work with a very large number of tables, so it's a lot more practical to find ways to capture logic in reusable chunks of code. This approach makes it easy to manage chunks of logic in a centralized fashion, meaning you can ensure consistency in the pipelines that you build. One way of doing this is with user-defined functions, also known as UDFs. With a user-defined function, you can write your own custom logic and reuse it over and over in your queries and data transformations. Typically, UDFs are used to capture logic that perform a specific computation. Say I need to perform a calculation that returns a value given some inputs. Or if I need to format a value like a telephone number in a certain way, for example, a user-defined function would be the perfect Snowflake primitive to capture that logic so that I can…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
What are data transformations?2m 19s
-
(Locked)
Data transformations with SQL5m 38s
-
(Locked)
Data transformations with snowpark7m 7s
-
(Locked)
Computations with user-defined functions7m 15s
-
(Locked)
Efficient transformations with streams8m 9s
-
(Locked)
Complex procedural logic with stored procedures6m 31s
-
(Locked)
Automatic transformations with dynamic tables8m 7s
-
(Locked)
Data transformations in visual studio code (optional)4m 34s
-
(Locked)
Recap and best practices for data transformations1m 39s
-
(Locked)
-
-