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:ย 

Catalogue global UDF's

AlexVB
New Contributor III

The current UDF implementation stores UDFs in a catalogue.schema location. This requires reference/call to said udf location; example `select my_catalogue.my_schema.my_udf()`. Or have the sql execute from that schema.

In Snowflake, UDFs are globally available. Say i define an Uber H3 UDF or a UUID5 UDF. Then I want to use this everywhere, without specifying some_catalogue.some_schema.uuid5.  I just want to do `select uuid5(name)`.

Alternatively, if we can allow functions to be stored on the catalogue level.

In my opinion, the UDF functionality is very useless at a larger scale with the current implementation.

2 REPLIES 2

Sidhant07
Databricks Employee
Databricks Employee

Hi @AlexVB ,

The current UDF implementation in Databricks requires referencing the UDF location with select my_catalogue.my_schema.my_udf() or executing SQL from that schema because Databricks organizes database objects using a three-tier hierarchy: Catalog, Schema (or Database), and Data Objects (such as Functions). This structure mandates specifying the catalog and schema to locate the UDF unless it is a temporary function scoped at the session level, which does not require such specification.

Sidhant07
Databricks Employee
Databricks Employee

Hi @AlexVB ,

Thanks for the feedback. Since you are comparing databricks with snowflake its ideal you discuss this with your sales rep.

 Your suggestion to allow functions to be stored at the catalog level or to make them globally available within Databricks is valuable. I can raise a feature request on your behalf so that our product team can prioritise it in future.

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