cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Creating java UDF for Spark SQL

sm1274
New Contributor

Hello, 

I have created a sample java UDF which masks few characters of a string. However I facing couple of issues when uploading and using it.

First I could only import it, which for now is OK. But when do the following,

create function udf_mask as 'baffleCrypto' using jar '/Workspace/Users/sumandra@baffle.io/baffle-databricks-udf-1.0-SNAPSHOT.jar' 
Throws an error 
[NOT_SUPPORTED_WITH_DB_SQL] CREATE FUNCTION is not supported on a SQL warehouse.
 
Is there an example on how to load a jar and then use it as external function. I followed the this guide 
https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-create-function.html
Even cut-n-paste errors out. 
 
Any ideas?
0 REPLIES 0