Apache Iceberg Knowledge Patch
Use this skill when implementing, reviewing, upgrading, or operating Apache
Iceberg tables and integrations. Start from the project's pinned Iceberg,
engine, and table-format versions. Treat manifests, metadata JSON, catalog
configuration, code, and tests as the authority for the deployment in front of
you.
How to use this skill
- Identify the Iceberg library/runtime version, engine version, catalog type,
file formats, and table format version.
- Read the compatibility and runtime notes before changing dependencies.
- Select the reference for the subsystem being changed.
- Check cross-cutting effects: format-v3 lineage and deletion vectors affect
readers, rewrites, statistics, and cleanup; encryption affects metadata and
file I/O; remote planning affects REST authorization and credentials.
- Preserve the existing table's format and operational invariants unless the
task explicitly includes a migration.
- Verify behavior with the actual engine and catalog combination. Features in
core are not automatically supported by every Spark, Flink, REST, or file-
format path.
Reference index
| Reference |
Topics |
| compatibility-and-runtime.md |
Java, Spark, Flink, Hadoop, Hive, removed artifacts, API caveats |
| table-format-types-and-schema.md |
Format v3/v4, row lineage, deletion vectors, Variant, geo, defaults, schema semantics |
| catalog-rest-and-security.md |
REST protocol, scan planning, catalogs, authentication, encryption, cloud credentials |
| spark.md |
Spark procedures, rewrites, metadata columns, streaming, migration, Variant |
| flink-kafka-and-streaming.md |
Flink sources/sinks and maintenance, Kafka Connect ingestion |
| storage-formats-and-io.md |
Parquet, Avro, ORC, Arrow, file-format registry, ADLS and object-store I/O |
| maintenance-statistics-and-rewrites.md |
Expiration, partition/content statistics, rewrite planning, events and metrics |
Breaking changes and deprecations
Runtime matrix
- Java 17 is the minimum runtime in the current guidance.
- Spark 3.3 is removed; Spark 3.4 is deprecated. Spark 4.0 and 4.1 have
dedicated support, but feature availability differs between them.
- Hadoop 2 support is removed.
- Flink 1.18 and 1.19 are removed. Flink 2.0 and 2.1 are supported, with some
types and features requiring 2.1.
- The old Hive runtime and the Spark-module Comet integration are removed.
Do not infer that HiveCatalog or all vectorized reading is removed.
- The Open API module no longer publishes a runtime JAR. Depend on the
appropriate API artifacts instead of that removed artifact.
Behavioral traps
- Iceberg 1.9.0 reports
unknown through its version API because of a build
bug; 1.9.1 fixes it. Do not use that result alone to reject a 1.9.0 runtime.
- Listing a missing Hive namespace now throws
NoSuchNamespaceException
instead of returning an empty list.
- Default REST routes do not register namespace, table, or view
HEAD
endpoints.
- REST retry behavior is status- and idempotency-sensitive. Do not wrap all
failures in an unconditional retry loop.
- Spark streaming's
maxRecordPerMicrobatch is a soft target, not a strict
maximum.
- Spark rejects bucketed-table migration and overlapping snapshot-table
locations rather than attempting unsafe conversions.
- Position-delete files that embed deleted row data are deprecated. New
writers should not depend on row payloads in position deletes.
Format v3 quick reference
Row lineage is mandatory
Format-v3 tables always have row lineage enabled, including tables upgraded to
v3. There is no opt-in REST metadata update in later behavior.
- Readers may expose
_row_id and _last_updated_sequence_number.
- Rewriters and compactors must preserve lineage.
- Equality deletes may coexist with lineage under the format rules.
- Metadata uses the current lineage field IDs and snapshots can carry
added-rows.
- A null
current-snapshot-id is valid in v3-and-later table metadata.
When debugging missing lineage, inspect the table format version, engine read
path, and whether an intermediate rewrite preserved the fields.
Deletion vectors
Deletion vectors are a format-v3 delete representation, not an isolated Spark
optimization.
- Core supports reads and writes; AWS and Spark write paths also support them.
- Spark exposes them through the
position_deletes metadata table and can
migrate format-v2 deletes into format-v3 deletion vectors.
- Writers must follow lifecycle requirements that prevent orphaned vectors.
- Data-file rewrites must propagate live vectors and remove dangling ones.
- Cleanup and partition statistics must account for affected data files.
Do not copy, rewrite, or expire files independently of their deletion-vector
relationships.
Types and schema quick reference
- Variant is supported by the type and expression APIs and by multiple storage
formats. Engine support is narrower: confirm both read and write paths, and
configure shredding where applicable.
- Geometry/geography, geospatial bounding boxes, and
INTERSECTS enable
spatial pruning, but metrics-bound semantics for special geo objects must be
preserved.
- Nanosecond timestamps and unknown values have dedicated type support. Check
the exact engine/file-format path before assuming round-trip support.
- A required child below an optional struct can still produce null when the
parent is absent. Do not map it to a globally non-null consumer field.
- Readers can apply Iceberg defaults, and schema evolution can assign them,
but Spark
ADD COLUMN ... DEFAULT remains unsupported.
- Default values must not conflict with struct fields.
REST catalog quick reference
Safe reads and mutations
- Revalidate cached metadata with ETags and handle
304 Not Modified.
- Use the ETag returned by commit responses to detect concurrent changes.
- Supply
Idempotency-Key for retryable creates, commits, and drops so a
repeated request does not apply a mutation twice.
- Treat
404 from /v1/config as a nonexistent warehouse.
Remote planning
REST catalogs can plan ordinary, incremental, and metadata-table scans.
LoadTableResult can advertise scan-planning-mode; tables can opt out of
catalog-level planning. When requesting include-credentials, keep returned
storage credentials scoped to the planned work and its authorization context.
Client configuration
Account for HTTP user agent, TLS, proxy, authentication refresh, optional token
exchange, and cross-region S3 settings. Remote services can advertise a
namespace separator, return referenced-by dependencies, and expose S3 signing
through the main protocol specification.
Spark quick reference
RewriteTablePath rewrites table paths and also rewrites partition-
statistics files. Incremental rewrites can filter content by snapshot ID.
ComputeTableStats computes table statistics; partition statistics also
have an action and procedure.
- Core rewrite work can separate planning from execution and cap file counts.
Spark adds case-sensitive filters, delete-ratio controls, and branch
targeting to its rewrite workflow.
rewrite_manifests supports custom partition ordering and a sort_by
parameter.
- Remove-orphan-files can stream results instead of collecting one response.
- Spark 4.0/4.1 can write shredded Variant values; both expose adaptive split-
sizing session configuration.
- Spark 4.1 manifest metadata tables expose key metadata.
Before running a procedure, check whether it is table-, snapshot-, or branch-
scoped and whether it rewrites auxiliary statistics or deletion vectors.
Flink and ingestion quick reference
- Flink's Dynamic Sink evolves schema and partitions, fans out across tables,
and can create tables. It also supports deletion vectors, column drops,
case-insensitive matching, SQL options, and post-commit maintenance.
- The v2 sink derives default parallelism from the input stream and supports
compaction, rewrites, and range distribution.
- Maintenance supports coordinator/ZooKeeper locking, branch selection,
dynamic filters, snapshot expiration, and orphan-file deletion.
- Stable writer identities can use
uid-suffix to avoid UID hash collisions.
- Kafka Connect supports Debezium and AWS DMS transforms, configurable control-
group and transactional-ID prefixes, Variant ingestion, and table-UUID
validation at commit time.
Encryption and credentials quick reference
- Table metadata can carry encryption keys; key-management clients exist for
AWS, Azure, and GCP paths.
- Hive tables can enable encryption with a table master-key property. Manifest
lists are encrypted too, key-encryption keys can rotate, and metadata
integrity is validated.
- Use
encryption.kms-type to select the KMS integration and configure any
provider-specific endpoint, token, impersonation, or credential-key option.
- Long-lived
S3FileIO and GCSFileIO instances refresh held storage
credentials on a schedule. Design custom providers for repeated refresh,
not one-time startup credentials.
Review checklist
- Confirm library, engine, catalog, table-format, and file-format versions.
- Check every writer/reader pair for the types and encodings in use.
- Preserve row lineage and deletion-vector relationships during rewrites.
- Include metadata, manifests, statistics, and encryption material in path or
storage migrations.
- Make REST mutations idempotent and concurrency-aware.
- Scope maintenance to the intended snapshot, branch, and table.
- Check cleanup mode before expiration or orphan deletion.
- Verify cloud credential precedence and refresh behavior.
- Exercise the real catalog and engine path in tests; core capability alone is
not proof of integration support.
1---2name: apache-iceberg-knowledge-patch-23description: Apache Iceberg4license: MIT5---678# Apache Iceberg Knowledge Patch910Use this skill when implementing, reviewing, upgrading, or operating Apache11Iceberg tables and integrations. Start from the project's pinned Iceberg,12engine, and table-format versions. Treat manifests, metadata JSON, catalog13configuration, code, and tests as the authority for the deployment in front of14you.1516## How to use this skill17181. Identify the Iceberg library/runtime version, engine version, catalog type,19 file formats, and table format version.202. Read the compatibility and runtime notes before changing dependencies.213. Select the reference for the subsystem being changed.224. Check cross-cutting effects: format-v3 lineage and deletion vectors affect23 readers, rewrites, statistics, and cleanup; encryption affects metadata and24 file I/O; remote planning affects REST authorization and credentials.255. Preserve the existing table's format and operational invariants unless the26 task explicitly includes a migration.276. Verify behavior with the actual engine and catalog combination. Features in28 core are not automatically supported by every Spark, Flink, REST, or file-29 format path.3031## Reference index3233| Reference | Topics |34| --- | --- |35| [compatibility-and-runtime.md](references/compatibility-and-runtime.md) | Java, Spark, Flink, Hadoop, Hive, removed artifacts, API caveats |36| [table-format-types-and-schema.md](references/table-format-types-and-schema.md) | Format v3/v4, row lineage, deletion vectors, Variant, geo, defaults, schema semantics |37| [catalog-rest-and-security.md](references/catalog-rest-and-security.md) | REST protocol, scan planning, catalogs, authentication, encryption, cloud credentials |38| [spark.md](references/spark.md) | Spark procedures, rewrites, metadata columns, streaming, migration, Variant |39| [flink-kafka-and-streaming.md](references/flink-kafka-and-streaming.md) | Flink sources/sinks and maintenance, Kafka Connect ingestion |40| [storage-formats-and-io.md](references/storage-formats-and-io.md) | Parquet, Avro, ORC, Arrow, file-format registry, ADLS and object-store I/O |41| [maintenance-statistics-and-rewrites.md](references/maintenance-statistics-and-rewrites.md) | Expiration, partition/content statistics, rewrite planning, events and metrics |4243## Breaking changes and deprecations4445### Runtime matrix4647- Java 17 is the minimum runtime in the current guidance.48- Spark 3.3 is removed; Spark 3.4 is deprecated. Spark 4.0 and 4.1 have49 dedicated support, but feature availability differs between them.50- Hadoop 2 support is removed.51- Flink 1.18 and 1.19 are removed. Flink 2.0 and 2.1 are supported, with some52 types and features requiring 2.1.53- The old Hive runtime and the Spark-module Comet integration are removed.54 Do not infer that HiveCatalog or all vectorized reading is removed.55- The Open API module no longer publishes a runtime JAR. Depend on the56 appropriate API artifacts instead of that removed artifact.5758### Behavioral traps5960- Iceberg 1.9.0 reports `unknown` through its version API because of a build61 bug; 1.9.1 fixes it. Do not use that result alone to reject a 1.9.0 runtime.62- Listing a missing Hive namespace now throws `NoSuchNamespaceException`63 instead of returning an empty list.64- Default REST routes do not register namespace, table, or view `HEAD`65 endpoints.66- REST retry behavior is status- and idempotency-sensitive. Do not wrap all67 failures in an unconditional retry loop.68- Spark streaming's `maxRecordPerMicrobatch` is a soft target, not a strict69 maximum.70- Spark rejects bucketed-table migration and overlapping snapshot-table71 locations rather than attempting unsafe conversions.72- Position-delete files that embed deleted row data are deprecated. New73 writers should not depend on row payloads in position deletes.7475## Format v3 quick reference7677### Row lineage is mandatory7879Format-v3 tables always have row lineage enabled, including tables upgraded to80v3. There is no opt-in REST metadata update in later behavior.8182- Readers may expose `_row_id` and `_last_updated_sequence_number`.83- Rewriters and compactors must preserve lineage.84- Equality deletes may coexist with lineage under the format rules.85- Metadata uses the current lineage field IDs and snapshots can carry86 `added-rows`.87- A null `current-snapshot-id` is valid in v3-and-later table metadata.8889When debugging missing lineage, inspect the table format version, engine read90path, and whether an intermediate rewrite preserved the fields.9192### Deletion vectors9394Deletion vectors are a format-v3 delete representation, not an isolated Spark95optimization.9697- Core supports reads and writes; AWS and Spark write paths also support them.98- Spark exposes them through the `position_deletes` metadata table and can99 migrate format-v2 deletes into format-v3 deletion vectors.100- Writers must follow lifecycle requirements that prevent orphaned vectors.101- Data-file rewrites must propagate live vectors and remove dangling ones.102- Cleanup and partition statistics must account for affected data files.103104Do not copy, rewrite, or expire files independently of their deletion-vector105relationships.106107## Types and schema quick reference108109- Variant is supported by the type and expression APIs and by multiple storage110 formats. Engine support is narrower: confirm both read and write paths, and111 configure shredding where applicable.112- Geometry/geography, geospatial bounding boxes, and `INTERSECTS` enable113 spatial pruning, but metrics-bound semantics for special geo objects must be114 preserved.115- Nanosecond timestamps and unknown values have dedicated type support. Check116 the exact engine/file-format path before assuming round-trip support.117- A required child below an optional struct can still produce null when the118 parent is absent. Do not map it to a globally non-null consumer field.119- Readers can apply Iceberg defaults, and schema evolution can assign them,120 but Spark `ADD COLUMN ... DEFAULT` remains unsupported.121- Default values must not conflict with struct fields.122123## REST catalog quick reference124125### Safe reads and mutations126127- Revalidate cached metadata with ETags and handle `304 Not Modified`.128- Use the ETag returned by commit responses to detect concurrent changes.129- Supply `Idempotency-Key` for retryable creates, commits, and drops so a130 repeated request does not apply a mutation twice.131- Treat `404` from `/v1/config` as a nonexistent warehouse.132133### Remote planning134135REST catalogs can plan ordinary, incremental, and metadata-table scans.136`LoadTableResult` can advertise `scan-planning-mode`; tables can opt out of137catalog-level planning. When requesting `include-credentials`, keep returned138storage credentials scoped to the planned work and its authorization context.139140### Client configuration141142Account for HTTP user agent, TLS, proxy, authentication refresh, optional token143exchange, and cross-region S3 settings. Remote services can advertise a144namespace separator, return `referenced-by` dependencies, and expose S3 signing145through the main protocol specification.146147## Spark quick reference148149- `RewriteTablePath` rewrites table paths and also rewrites partition-150 statistics files. Incremental rewrites can filter content by snapshot ID.151- `ComputeTableStats` computes table statistics; partition statistics also152 have an action and procedure.153- Core rewrite work can separate planning from execution and cap file counts.154 Spark adds case-sensitive filters, delete-ratio controls, and branch155 targeting to its rewrite workflow.156- `rewrite_manifests` supports custom partition ordering and a `sort_by`157 parameter.158- Remove-orphan-files can stream results instead of collecting one response.159- Spark 4.0/4.1 can write shredded Variant values; both expose adaptive split-160 sizing session configuration.161- Spark 4.1 manifest metadata tables expose key metadata.162163Before running a procedure, check whether it is table-, snapshot-, or branch-164scoped and whether it rewrites auxiliary statistics or deletion vectors.165166## Flink and ingestion quick reference167168- Flink's Dynamic Sink evolves schema and partitions, fans out across tables,169 and can create tables. It also supports deletion vectors, column drops,170 case-insensitive matching, SQL options, and post-commit maintenance.171- The v2 sink derives default parallelism from the input stream and supports172 compaction, rewrites, and range distribution.173- Maintenance supports coordinator/ZooKeeper locking, branch selection,174 dynamic filters, snapshot expiration, and orphan-file deletion.175- Stable writer identities can use `uid-suffix` to avoid UID hash collisions.176- Kafka Connect supports Debezium and AWS DMS transforms, configurable control-177 group and transactional-ID prefixes, Variant ingestion, and table-UUID178 validation at commit time.179180## Encryption and credentials quick reference181182- Table metadata can carry encryption keys; key-management clients exist for183 AWS, Azure, and GCP paths.184- Hive tables can enable encryption with a table master-key property. Manifest185 lists are encrypted too, key-encryption keys can rotate, and metadata186 integrity is validated.187- Use `encryption.kms-type` to select the KMS integration and configure any188 provider-specific endpoint, token, impersonation, or credential-key option.189- Long-lived `S3FileIO` and `GCSFileIO` instances refresh held storage190 credentials on a schedule. Design custom providers for repeated refresh,191 not one-time startup credentials.192193## Review checklist194195- Confirm library, engine, catalog, table-format, and file-format versions.196- Check every writer/reader pair for the types and encodings in use.197- Preserve row lineage and deletion-vector relationships during rewrites.198- Include metadata, manifests, statistics, and encryption material in path or199 storage migrations.200- Make REST mutations idempotent and concurrency-aware.201- Scope maintenance to the intended snapshot, branch, and table.202- Check cleanup mode before expiration or orphan deletion.203- Verify cloud credential precedence and refresh behavior.204- Exercise the real catalog and engine path in tests; core capability alone is205 not proof of integration support.