I am using Snowpark for Python. I want to import imblearn package but when I check pre-installed packages at https://repo.anaconda.com/pkgs/snowflake/ this package is not installed in the Snowpark anaconda environment. How can use this package on snowpark?
A number of open source third-party Python packages that are built and provided by Anaconda are made available to use out of the box inside Snowflake.
Snowflake is constantly adding new packages. But if you don't find a specific package then
First check if the package has only native python code(pure python package), if so, then install the package to your local, zip it and put it to the snowflake stage and add this stage path in the imports parameter or add_import() method. This should work.
If not, all one can do is wait for it to be available.
Also in snowflake you can use this query to get the details about the packages:
select * from information_schema.packages where language = 'python';
If the package you want to use only have native Python code then you might be able to use it.
Simplest way is to install the package into your local environment and then zip the installation directory and and add that zip using the IMPORTS parameter when using CREATE FUNCTION or the add_import() method if using Snowpark API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With