Scalar and Batch Unity Catalog Python UDFs are now generally available
Python UDFs in Unity Catalog are now generally available. This release adds named handlers, removes call limits, and supports custom dependencies and secrets.
O que mudou
Scalar and Batch Python UDFs in Unity Catalog are now generally available across all supported compute types, introducing named handlers, dependency installation, and secret access.
Use cases
Imagine you need to apply custom Python logic directly within SQL queries or data pipelines while leveraging external libraries, secured secrets, and structured handlers. With this release, you can:
- Run scalar and batch UDFs without the previous five-call limit per query.
- Use named handlers to structure entry points cleanly.
- Access secure secrets and external custom dependencies.
How to use
You can register and use a Python UDF with a named handler using SQL.
CREATE OR REPLACE FUNCTION my_catalog.my_schema.greet(name STRING)
RETURNS STRING
LANGUAGE PYTHON
HANDLER 'greet_handler'
ENVIRONMENT (
environment_version = '6'
)
AS $$
greeting_prefix = "Hello"
def greet_handler(name):
return f"{greeting_prefix}, {name}!"
$$;
What happens in this code:
- The command creates or replaces the UDF in the specified catalog and schema.
- The
HANDLERclause points togreet_handleras the execution entry point. - The
ENVIRONMENTclause sets the environment version to '6'. - The function body initializes variables once and processes the input parameters.
Limitations and requirements
- Available on all supported compute types, with specific runtime and environment version requirements depending on the feature.
- Advanced features like secrets and named handlers require explicitly setting the
environment_versionto '6' or higher.
- unity catalog
- python udf
- serverless
- sql warehouse
- governance
Scalar and Batch Unity Catalog Python UDFs are now generally available
Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.
Relacionadas
- DatabricksGA
Repositórios de pacotes em nível de workspace para Databricks Apps
Administradores de workspace podem configurar repositórios padrão de pacotes Python e npm para Databricks Apps.
databricks apps · workspace settings - DatabricksGA
Redimensione partições de stateful streaming sem perder o checkpoint no Databricks
Agora é possível alterar o número de partições de shuffle em queries Structured Streaming e pipelines Lakeflow sem descartar o estado do checkpoint.
structured streaming · lakeflow - DatabricksAtualização
Google Gemini 4 Argon disponível no Unity Gateway do Databricks
O modelo multimodal Google Gemini 4 Argon já pode ser acessado via Foundation Model APIs e Unity Gateway.
unity catalog · foundation model apis