1---
2name: databricks-iceberg
3description: "Apache Iceberg tables on Databricks — Managed Iceberg tables, External Iceberg Reads (fka Uniform), Compatibility Mode, Iceberg REST Catalog (IRC), Iceberg v3, Snowflake interop, PyIceberg, OSS Spark, external engine access and credential vending. Use when creating Iceberg tables, enabling External Iceberg Reads (uniform) on Delta tables (including Streaming Tables and Materialized Views via compatibility mode), configuring external engines to read Databricks tables via Unity Catalog IRC, integrating with Snowflake catalog to read Foreign Iceberg tables"
4compatibility: Requires databricks CLI (>= v1.0.0)
5metadata:
6 version: "0.1.0"
7parent: databricks-core
8---
9
10# Apache Iceberg on Databricks
11
12Databricks provides multiple ways to work with Apache Iceberg: native managed Iceberg tables, UniForm for Delta-to-Iceberg interoperability, and the Iceberg REST Catalog (IRC) for external engine access.
13
14---
15
16## Critical Rules (always follow)
17
18- **MUST** use Unity Catalog — all Iceberg features require UC-enabled workspaces
19- **MUST NOT** install an Iceberg library into Databricks Runtime (DBR includes built-in Iceberg support; adding a library causes version conflicts)
20- **MUST NOT** set `write.metadata.path` or `write.metadata.previous-versions-max` — Databricks manages metadata locations automatically; overriding causes corruption
21- **MUST** determine which Iceberg pattern fits the use case before writing code — see the [When to Use](#when-to-use) section below
22- **MUST** know that both `PARTITIONED BY` and `CLUSTER BY` produce the same Iceberg metadata for external engines — UC maintains an Iceberg partition spec with partition fields corresponding to the clustering keys, so external engines reading via IRC see a partitioned Iceberg table (not Hive-style, but proper Iceberg partition fields) and can prune on those fields; internally UC uses those fields as liquid clustering keys; the only differences between the two syntaxes are: (1) `PARTITIONED BY` is standard Iceberg DDL (any engine can create the table), while `CLUSTER BY` is DBR-only DDL; (2) `PARTITIONED BY` **auto-handles** DV/row-tracking properties, while `CLUSTER BY` requires manual TBLPROPERTIES on v2
23- **MUST NOT** use expression-based partition transforms (`bucket()`, `years()`, `months()`, `days()`, `hours()`) with `PARTITIONED BY` on managed Iceberg tables — only plain column references are supported; expression transforms cause errors
24- **MUST** disable deletion vectors and row tracking when using `CLUSTER BY` on Iceberg v2 tables — set `'delta.enableDeletionVectors' = false` and `'delta.enableRowTracking' = false` in TBLPROPERTIES (Iceberg v3 handles this automatically; `PARTITIONED BY` handles this automatically on both v2 and v3)
25
26---
27
28## Key Concepts
29
30| Concept | Summary |
31|---------|---------|
32| **Managed Iceberg Table** | Native Iceberg table created with `USING ICEBERG` — full read/write in Databricks and via external Iceberg engines |
33| **External Iceberg Reads (Uniform)** | Delta table that auto-generates Iceberg metadata — read as Iceberg externally, write as Delta internally |
34| **Compatibility Mode** | UniForm variant for streaming tables and materialized views in SDP pipelines |
35| **Iceberg REST Catalog (IRC)** | Unity Catalog's built-in REST endpoint implementing the Iceberg REST Catalog spec — lets external engines (Spark, PyIceberg, Snowflake) access UC-managed Iceberg data |
36| **Iceberg v3** | Next-gen format (Beta, DBR 17.3+) — deletion vectors, VARIANT type, row lineage |
37
38---
39
40## Quick Start
41
42### Create a Managed Iceberg Table
43
44```sql
45-- No clustering
46CREATE TABLE my_catalog.my_schema.events
47USING ICEBERG
48AS SELECT * FROM raw_events;
49
50-- PARTITIONED BY (recommended for cross-platform): standard Iceberg syntax, works on EMR/OSS Spark/Trino/Flink
51-- auto-disables DVs and row tracking — no TBLPROPERTIES needed on v2 or v3
52CREATE TABLE my_catalog.my_schema.events
53USING ICEBERG
54PARTITIONED BY (event_date)
55AS SELECT * FROM raw_events;
56
57-- CLUSTER BY on Iceberg v2 (DBR-only syntax): must manually disable DVs and row tracking
58CREATE TABLE my_catalog.my_schema.events
59USING ICEBERG
60TBLPROPERTIES (
61 'delta.enableDeletionVectors' = false,
62 'delta.enableRowTracking' = false
63)
64CLUSTER BY (event_date)
65AS SELECT * FROM raw_events;
66
67-- CLUSTER BY on Iceberg v3 (DBR-only syntax): no TBLPROPERTIES needed
68CREATE TABLE my_catalog.my_schema.events
69USING ICEBERG
70TBLPROPERTIES ('format-version' = '3')
71CLUSTER BY (event_date)
72AS SELECT * FROM raw_events;
73```
74
75### Enable UniForm on an Existing Delta Table
76
77```sql
78ALTER TABLE my_catalog.my_schema.customers
79SET TBLPROPERTIES (
80 'delta.columnMapping.mode' = 'name',
81 'delta.enableIcebergCompatV2' = 'true',
82 'delta.universalFormat.enabledFormats' = 'iceberg'
83);
84```
85
86---
87
88## Read/Write Capability Matrix
89
90| Table Type | Databricks Read | Databricks Write | External IRC Read | External IRC Write |
91|------------|:-:|:-:|:-:|:-:|
92| Managed Iceberg (`USING ICEBERG`) | Yes | Yes | Yes | Yes |
93| Delta + UniForm | Yes (as Delta) | Yes (as Delta) | Yes (as Iceberg) | No |
94| Delta + Compatibility Mode | Yes (as Delta) | Yes | Yes (as Iceberg) | No |
95
96---
97
98## Reference Files
99
100| File | Summary | Keywords |
101|------|---------|----------|
102| [references/1-managed-iceberg-tables.md](references/1-managed-iceberg-tables.md) | Creating and managing native Iceberg tables — DDL, DML, Liquid Clustering, Predictive Optimization, Iceberg v3, limitations | CREATE TABLE USING ICEBERG, CTAS, MERGE, time travel, deletion vectors, VARIANT |
103| [references/2-uniform-and-compatibility.md](references/2-uniform-and-compatibility.md) | Making Delta tables readable as Iceberg — UniForm for regular tables, Compatibility Mode for streaming tables and MVs | UniForm, universalFormat, Compatibility Mode, streaming tables, materialized views, SDP |
104| [references/3-iceberg-rest-catalog.md](references/3-iceberg-rest-catalog.md) | Exposing Databricks tables to external engines via the IRC endpoint — auth, credential vending, IP access lists | IRC, REST Catalog, credential vending, EXTERNAL USE SCHEMA, PAT, OAuth |
105| [references/4-snowflake-interop.md](references/4-snowflake-interop.md) | Bidirectional Snowflake-Databricks integration — catalog integration, foreign catalogs, vended credentials | Snowflake, catalog integration, external volume, vended credentials, REFRESH_INTERVAL_SECONDS |
106| [references/5-external-engine-interop.md](references/5-external-engine-interop.md) | Connecting PyIceberg, OSS Spark, AWS EMR, Apache Flink, and Kafka Connect via IRC | PyIceberg, OSS Spark, EMR, Flink, Kafka Connect, pyiceberg.yaml |
107
108---
109
110## When to Use
111
112- **Creating a new Iceberg table** → [references/1-managed-iceberg-tables.md](references/1-managed-iceberg-tables.md)
113- **Making an existing Delta table readable as Iceberg** → [references/2-uniform-and-compatibility.md](references/2-uniform-and-compatibility.md)
114- **Making a streaming table or MV readable as Iceberg** → [references/2-uniform-and-compatibility.md](references/2-uniform-and-compatibility.md) (Compatibility Mode section)
115- **Choosing between Managed Iceberg vs UniForm vs Compatibility Mode** → decision table in [references/2-uniform-and-compatibility.md](references/2-uniform-and-compatibility.md)
116- **Exposing Databricks tables to external engines via REST API** → [references/3-iceberg-rest-catalog.md](references/3-iceberg-rest-catalog.md)
117- **Integrating Databricks with Snowflake (either direction)** → [references/4-snowflake-interop.md](references/4-snowflake-interop.md)
118- **Connecting PyIceberg, OSS Spark, Flink, EMR, or Kafka** → [references/5-external-engine-interop.md](references/5-external-engine-interop.md)
119
120---
121
122## Common Issues
123
124| Issue | Solution |
125|-------|----------|
126| **No Change Data Feed (CDF)** | CDF is not supported on managed Iceberg tables. Use Delta + UniForm if you need CDF. |
127| **UniForm async delay** | Iceberg metadata generation is asynchronous. After a write, there may be a brief delay before external engines see the latest data. Check status with `DESCRIBE EXTENDED table_name`. |
128| **Compression codec change** | Managed Iceberg tables use `zstd` compression by default (not `snappy`). Older Iceberg readers that don't support zstd will fail. Verify reader compatibility or set `write.parquet.compression-codec` to `snappy`. |
129| **Snowflake 1000-commit limit** | Snowflake's Iceberg catalog integration can only see the last 1000 Iceberg commits. High-frequency writers must compact metadata or Snowflake will lose visibility of older data. |
130| **Deletion vectors with UniForm** | UniForm requires deletion vectors to be disabled (`delta.enableDeletionVectors = false`). If your table has deletion vectors enabled, disable them before enabling UniForm. |
131| **No shallow clone for Iceberg** | `SHALLOW CLONE` is not supported for Iceberg tables. Use `DEEP CLONE` or `CREATE TABLE ... AS SELECT` instead. |
132| **Version mismatch with external engines** | Ensure external engines use an Iceberg library version compatible with the format version of your tables. Iceberg v3 tables require Iceberg library 1.9.0+. |
133
134---
135
136## Related Skills
137
138- **[databricks-unity-catalog](../databricks-unity-catalog/SKILL.md)** — catalog/schema management, governance, system tables
139- **databricks-pipelines** — SDP pipelines (streaming tables, materialized views with Compatibility Mode)
140- **[databricks-python-sdk](../databricks-python-sdk/SKILL.md)** — Python SDK and REST API for Databricks operations
141- **[databricks-dbsql](../databricks-dbsql/SKILL.md)** — SQL warehouse features, query patterns
142
143---
144
145## Resources
146
147- **[Iceberg Overview](https://docs.databricks.com/iceberg/)** — main hub for Iceberg on Databricks
148- **[UniForm](https://docs.databricks.com/delta/uniform.html)** — Delta Universal Format
149- **[Iceberg REST Catalog](https://docs.databricks.com/external-access/iceberg)** — IRC endpoint and external engine access
150- **[Compatibility Mode](https://docs.databricks.com/external-access/compatibility-mode)** — UniForm for streaming tables and MVs
151- **[Iceberg v3](https://docs.databricks.com/iceberg/iceberg-v3)** — next-gen format features (Beta)
152- **[Foreign Tables](https://docs.databricks.com/query-data/foreign-tables.html)** — reading external catalog data