Write to Unity Catalog managed Delta tables from external Spark clients
Now GA: create and write data directly to Unity Catalog managed Delta tables from external Apache Spark clusters using catalog commits.
O que mudou
Support for creating and writing to Unity Catalog managed Delta tables from external Apache Spark clients is now generally available (GA). Access is provided through the Unity REST API on tables configured with catalog commits.
Use cases
Imagine having your own Apache Spark processing infrastructure running outside of Databricks (such as on Kubernetes or EMR) and needing to load data directly into corporate managed lakehouse tables without demoting them to external tables.
With this capability, you can:
- Append and insert data into managed Delta tables directly from external Spark jobs.
- Create new managed tables in Unity Catalog from external systems.
- Keep governance and access control centralized in Unity Catalog while processing data across external compute.
How to use
To allow external writes, the managed Delta table must have catalog commits enabled (delta.feature.catalogManaged).
Create the managed table using SQL in Databricks Runtime:
CREATE TABLE meu_catalogo.meu_schema.minha_tabela (id INT, desc STRING)
USING delta
TBLPROPERTIES ('delta.feature.catalogManaged' = 'supported');
What happens in this code:
- A managed Delta table is created in the designated catalog and schema.
- The
delta.feature.catalogManagedtable property is set tosupported, delegating commit coordination to Unity Catalog.
In your external Apache Spark cluster, configure your session with the necessary packages and endpoints (using OAuth M2M authentication):
# SparkSession configuration for external Spark
spark_conf = {
"spark.sql.extensions": "io.delta.sql.DeltaSparkSessionExtension",
"spark.sql.catalog.spark_catalog": "org.apache.spark.sql.delta.catalog.DeltaCatalog",
"spark.sql.catalog.meu_catalogo": "io.unitycatalog.spark.UCSingleCatalog",
"spark.sql.catalog.meu_catalogo.uri": "https://meu-workspace.cloud.databricks.com",
"spark.sql.catalog.meu_catalogo.auth.type": "oauth",
"spark.sql.catalog.meu_catalogo.auth.oauth.uri": "https://meu-workspace.cloud.databricks.com/oidc/v1/token",
"spark.sql.catalog.meu_catalogo.auth.oauth.clientId": "<oauth-client-id>",
"spark.sql.catalog.meu_catalogo.auth.oauth.clientSecret": "<oauth-client-secret>",
"spark.sql.defaultCatalog": "meu_catalogo",
"spark.hadoop.fs.s3.impl": "org.apache.hadoop.fs.s3a.S3AFileSystem",
"spark.jars.packages": "io.delta:delta-spark_4.1_2.13:4.3.0,io.unitycatalog:unitycatalog-spark_4.1_2.13:0.5.0,org.apache.hadoop:hadoop-aws:3.4.2"
}
What happens in this code:
- Enables Delta Lake SQL extensions and points the catalog integration to Unity Catalog.
- Sets the REST API endpoint to your Databricks workspace URL.
- Configures OAuth machine-to-machine (M2M) authentication, automatically handling token renewal for long-running batch jobs.
Limitations and requirements
- Status: Generally available (GA) for Apache Spark. Other engines (DuckDB, Flink, Starburst, StreamNative) remain in Beta.
- Component requirements: Apache Spark 4.0 or 4.1, Delta Spark 4.3.0+, and Unity Catalog Spark client 0.5.0+.
- Databricks Runtime: DBR 16.4+ to read, write, or create tables with catalog commits; DBR 18.0+ to toggle catalog commits on existing tables.
- Permissions: External data access must be enabled on the metastore. The principal requires
EXTERNAL USE SCHEMAon the schema,SELECTandMODIFYon the table (orCREATEon the schema for new tables). - Restrictions: External clients cannot perform maintenance tasks (
OPTIMIZE,VACUUM,ANALYZE), alter internal table properties (delta.*ordatabricks.*), rename columns, add constraints, or write to tables with IcebergCompatV3. - Concurrency: Modifying the same Delta table on S3 from different writer engines simultaneously is discouraged to prevent data loss or corruption.
Using it in a pipeline
In hybrid architectures, an external Spark cluster can handle initial extraction and write directly to Bronze or Silver managed tables governed by Unity Catalog, leaving Databricks SQL or native jobs to produce final Gold tables.
- delta lake
- unity catalog
- apache spark
- rest api
External writes to managed Delta tables 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
- DatabricksBeta
Conector do SurveyMonkey chega ao Lakeflow Connect no Databricks
O Lakeflow Connect agora conta com conector nativo para o SurveyMonkey em Beta, permitindo ingestão incremental de pesquisas, respostas e contatos com governança no Unity Catalog.
lakeflow connect · surveymonkey - DatabricksBeta
Lakeflow Connect adiciona conector do Oracle Eloqua em Beta
O Lakeflow Connect agora oferece um conector gerenciado em Beta para o Oracle Eloqua, permitindo ingestão incremental de dados de marketing governados pelo Unity Catalog.
lakeflow connect · oracle eloqua - DatabricksBeta
Ingira métricas do GA4 com o novo conector do Lakeflow Connect
O Lakeflow Connect ganha conector gerenciado em Beta para o Google Analytics 4, permitindo ingestão incremental de relatórios agregados via API com governança no Unity Catalog.
lakeflow connect · google analytics