cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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)

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.