Permanent UDF in Databricks using Python Wheel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2022 05:19 AM
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 🙂
- Labels:
-
Create function
-
Integer
-
Python Wheel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2022 09:34 AM
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)

