cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Permanent UDF in Databricks using Python Wheel

Sudd
New Contributor II

I have a simple Python Program, which takes a Integer as a input and gives a string as a output.

I have created the wheel file for this Python code.

Then I have uploaded it in the Wheel section of Databricks cluster.

After this I want to create a permanent function using this wheel.

Earlier I have done it using jar file by the below command:

%sql

CREATE FUNCTION simple_udf AS 'SimpleUdf'

  USING JAR '/tmp/SimpleUdf.jar';

This time I want to create a function using the python wheel file.

End goal is to use the permanent function in the view definition.

Any help is appreciated 🙂

1 REPLY 1

Hubert-Dudek
Esteemed Contributor III

First, you will need to onboard the unity catalog and sign for Python UDF preview https://www.databricks.com/blog/2022/07/22/power-to-the-sql-people-introducing-python-udfs-in-databr...

But I doubt it will be possible to use a wheel (but who knows I haven't seen any documentation yet)

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group