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: 

External functions on a SQL endpoint

Vegard_Stikbakk
New Contributor II

want to create an external function using CREATE FUNCTION (External) and expose it to users of my SQL endpoint. Although this works from a SQL notebook, if I try to use the function from a SQL endpoint, I get "User defined expression is not supported on a SQL endpoint." Specifically, the function is created by doing this, like the example in the CREATE FUNCTION (External) docs says.

CREATE FUNCTION f1 AS 'SimpleUDF' USING JAR '/dbfs/FileStore/udf.jar'

Screenshot of error message

Screenshot 2022-03-24 at 21.32.59 

The JAR lives in DBFS. Maybe the reason why this doesn't work is that a SQL endpoint doesn't have access to DBFS? I haven't been able to find anything about this, though.

I hope someone can help!

1 ACCEPTED SOLUTION

Accepted Solutions

Hubert-Dudek
Esteemed Contributor III

It is separated runtime https://docs.databricks.com/sql/release-notes/index.html#channels so it seems that it is not yet supported.

There is CREATE FUNCTION documentation but it seems that it is support only SQL syntax https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-sql-function.html

View solution in original post

1 REPLY 1

Hubert-Dudek
Esteemed Contributor III

It is separated runtime https://docs.databricks.com/sql/release-notes/index.html#channels so it seems that it is not yet supported.

There is CREATE FUNCTION documentation but it seems that it is support only SQL syntax https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-sql-function.html

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