VBUC
Visual Basic Upgrade Companion. VB6 Converter for .NET & Web.

VB6
ASP
.NET7 supportDownload Now

WebMAP
Cloud Application Migration Tools Transform Desktop Applications

C#
Silverlight
Access
VB.NET
PowerBuilder
Winforms
ASP.NET Web Forms

SnowConvert
The best available tools to perform code migrations from a source database or Spark application to Snowflake.

Oracle
Spark Scala
Spark Python
SQL Server
Teradata

Data Solutions
The premier productivity workbench designed and optimized for teams using Snowflake.

Translation with SnowConvert
Edit, Debug & Deploy
Automated Test Case Generation
Metadata Analysis
Source Code Management

Get Started
There are countless ways to take advantage of BlackDiamond Studio and SnowConvert.

Migration and Other Snowflake Services
Get Up and Running with Snowpark
Using the SnowConvert Trial
Build a Cross-Platform Object Inventory

Monetize Your Data

Time to Mobilize
Free Assessment Tool

Can I use my .egg files in Snowpark?

by Mauricio Rojas, on Oct 5, 2022 9:17:00 AM

I was looking at a project Mobilize.Net is moving from Spark to Snowpark, and this question popped up:

Is there a way to use my .egg files in Snowpark?

 

 

Technically, an .egg file is a zip file. And Snowpark allows you to package custom libraries as zip files, so I wanted to give it a try.

So I went to BlackDiamond Studio and I created a new project. It is very easy to start programming with Snowpark there. So I started a new project:

I selected to build my code from a template:

And selected the Python template:

This template allows you to get started right away. Once in there, I created a small set of code with this folder structure. 

 

The __init__.py is empty and used only for Python to recognize it as a package.

The main.py is simple:

And the setup.py is:

With that in place I used the context menu option (BlackDiamond: Export Python UDF) to generate a .sql deployment template:

I used that template as a based and modified it to:

And then created an small script to deploy it:

NOTE: I did have to modify the file extension from .egg to .zip.

With all that in place, I can call the UDF:

So as you can see, the answer is yes. You can use you .egg files in Snowpark.

That does not mean that I am recommending to use them, but it is perfectly valid to use this approach.

Topics:Pythonsnowparkdeploymentegg

Comments

Subscribe to Mobilize.Net Blog

More...

More...
FREE CODE ASSESSMENT TOOL