During this post we will discuss about how to use third party packages from anaconda in Snowflake. As we know Anaconda Announces Partnership with Snowflake to Bring Open-Source Python to the Data Cloud. Hence, Now onwards a number of popular open source third-party Python packages that are built and provided by Anaconda are made available to use out of the box inside Snowflake. Moreover, There is no additional cost for the use of the Anaconda packages apart from Snowflake’s standard consumption-based pricing.
We can view the list of third-party packages from Anaconda, see the Anaconda Snowflake channel.
Before start using the packages provide by Anaconda inside Snowflake, organization administrator(ORGADMIN) role requires:
- Log into Snowsight, the Snowflake web interface.
- Click the dropdown menu next to your login name, then click Switch Role» ORGADMIN to change to the organization administrator role.
- Click Admin» Billing » Terms & Billing.
Snowsight Anaconda Config
4. Scroll to the Anaconda section and click the Enable button. The Anaconda Packages (Preview Feature) dialog opens.
5. Click the link to review the Snowflake Third Party Terms.
6. If you agree to the terms, click the Acknowledge & Continue button.
Now go to the worksheet and create a Python UDF:
In this UDF, we have imported packages = (‘faker’,’simplejson’). From the faker library we have imported FAKER and internet module.
Now execute the UDF and observe the output:
So this is one of the way where we can leverage Anaconda packages in Snowflake worksheet.