Register permanent UDF from Python file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 01:11 AM
Hello,
I am trying to create a permanent UDF from a Python file with dependencies that are not part of the standard Python library.
How do I make use of CREATE FUNCTION (External) [1] to create a permanent function in Databricks, using a Python file that contains my function?
NOTE: If I understand it correctly, CREATE FUNCTION (SQL and Python) [2], will not work in our case because dependencies are limited to the libraries defined in [2]. We also want to automate this, meaning that I will be writing/updating our functions in a gitrepo and use CI/CD to create/update the permanent functions in Databricks.
References
[1] https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-create-function.html