From the course: Snowpark for Data Engineers
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
Accessing external packages in AUDF - Snowflake Tutorial
From the course: Snowpark for Data Engineers
Accessing external packages in AUDF
- [Instructor] All of the UDFs that we've created and registered so far, whether anonymous or named, have been fairly simple. They only make use of the core Python functionality and core Python libraries. What if you need to use external libraries to write code for your UDF? In order for your UDFs to reference external libraries, you need to install the right Anaconda packages for your current session. Head over to packages and let's find NumPy within the Anaconda packages here. NumPy is a Python library for numeric computations. It provides support for large multidimensional arrays and matrices. NumPy has a number of mathematical functions and I'm going to use one of those functions in my UDF. Once you've found the NumPy package within the Snowflake Anaconda channel, go ahead and install it. This is the same session where we previously installed the Pandas package. I've gone ahead and added NumPy as well. The latest version of NumPy at the time of this recording is 1.26.4 and that's…
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)
UDFS, UDTFs, and Stored procedures4m 39s
-
(Locked)
Creating anonymous UDFs in Snowpark4m 16s
-
(Locked)
Creating named UDFs in Snowpark3m 21s
-
(Locked)
Accessing external packages in AUDF2m 18s
-
(Locked)
Understanding temporary UDFs5m 55s
-
(Locked)
Creating and invoking permanent UDFs2m 53s
-
(Locked)
-
-
-