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

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…

Contents