Adds a table function, or a Python or SQL UDF, to Unity Catalog so that it falls under governance like other objects. Doing so takes the relevant privilege on the schema.
Read more: Databricks docs
In the Ultra Transcenders books
Each book explains CREATE FUNCTION in context, with comparison tables and the common traps.
Terms in this definition
- Event
Table in Log Analytics where entries from Windows event logs are kept.
- FUNCTION
Registered models count as functions in Unity Catalog, so this securable type governs them too: access is given through
GRANT ... ON FUNCTION, and REST calls passFUNCTIONassecurable_type. - Serverless
Compute tier for single Azure SQL databases that scales automatically, pauses when idle and charges by the second. It is offered in General Purpose and Hyperscale, not Business Critical, and reserved capacity does not apply.
- UDF
Custom logic written in JavaScript and registered with a Cosmos DB container, callable only from queries. Calling one raises the request unit charge.
- Unity Catalog
Azure Databricks' governance solution covering both data and AI in one place, with centralised permissions, auditing, data discovery and lineage.
- Governance
Keeping cloud deployments in line with an organisation's rules on technology, security and compliance, helped by Azure Policy, tags and resource locks.
- LIKE
Compares strings with a pattern that can contain the % and _ wildcards. Because it only understands character patterns, searching big volumes of text this way is much slower than using full-text search.
- Schema
The middle part of a Unity Catalog name (
catalog.schema.table), grouping tables, views, volumes, functions and models inside a catalog. A grant on it covers everything in it now and later, and nothing inside can be reached withoutUSE SCHEMA.
Related terms
- Custom function
Typically made by right-clicking a parameterised query and picking Create Function, this reusable Power Query function runs the same steps on each file or value. It keeps a link to the sample query it came from and is applied through Invoke Custom Function.
- DETERMINISTIC
Tells the engine, in
CREATE FUNCTION, that identical inputs always give identical outputs, which can help optimisation. The engine takes this on trust and does not verify it against the function's code. - ENVIRONMENT clause
Declares what a Python UDF needs, namely its
environment_versionanddependencies, when the function is created withCREATE FUNCTION. - HANDLER
Tells a Unity Catalog Python UDF which function in its body to start from, as part of
CREATE FUNCTION. In a batch UDF, that function receives an iterator ofpandas.Series. - Invoke Custom Function
Runs a custom function against every row of a table in Power Query, placing each result in a new column. To make such a function in the first place, use Create Function on a query built around a parameter.
- PARAMETER STYLE PANDAS
Turns a Unity Catalog Python UDF into a batch function when used in
CREATE FUNCTION. ItsHANDLERreceives an iterator ofpandas.Series, and the output row count has to equal the input row count. - RETURNS
States what a function gives back, as a type or a table, inside
CREATE FUNCTION. SQL functions can leave it out and have the type worked out from their body. - Stored function
Reusable KQL logic saved in the database schema as a user-defined function, using .create-or-alter function or .create function. A function declared with let, by contrast, is query-defined and only exists while that one query runs.