Scala UDFs in Unity Catalog can now access secrets
Session-scoped and Unity Catalog Scala UDFs can now access secrets managed in Unity Catalog.
O que mudou
User-defined functions in Scala, both session-scoped and Unity Catalog native ones, now support reading centrally managed secrets. Unity Catalog UDFs use the function owner's permissions, eliminating the need for callers to have direct access to the secrets.### Use casesImagine you need to write a Scala UDF that connects to an external API using protected credentials without exposing sensitive passwords in the code.
- Read secrets in session-scoped Scala UDFs using the caller's permissions.
- Read secrets in Unity Catalog Scala UDFs by declaring them in the SECRETS clause.
- Isolate credentials so regular users can execute functions without direct secret access.### How to useTo use secrets in Unity Catalog UDFs, declare the secret in the function and ensure the environment version meets the requirements.```sql CREATE FUNCTION meu_catalogo.meu_esquema.minha_udf_scala() RETURNS STRING LANGUAGE SCALA ENVIRONMENT_VERSION '6' SECRETS ('meu_catalogo.meu_esquema.meu_segredo') AS 'com.exemplo.MinhaClasse.lerSegredo';
1. Creates a new Scala UDF inside Unity Catalog.
2. Sets the environment version to 6 or above, which is required for secret access.
3. Declares the secret to be securely consumed by the function logic.### Limitations and requirements- Requires serverless compute with environment version 6 or above, or classic compute with Databricks Runtime 19 or above in standard access mode.
- Only serverless SQL warehouses support Unity Catalog Scala UDFs that access secrets.
- The function creator must have READ SECRET permission on the secret and USE CATALOG/USE SCHEMA on parent objects.
- unity catalog
- scala
- udf
- secrets
- security
Scala UDFs can access Unity Catalog secrets
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