Data Platform / Storage
Data PlatformStorageIcebergDelta

Open Table Format

Problem

Object storage alone lacks ACID transactions, schema evolution, and time-travel, making concurrent writes to large tables error-prone. Without transactional metadata, teams face partial reads, lost updates, expensive full rewrites for schema changes, and no reliable way to audit or roll back historical states.

Solution

Adopt an Open Table Format (like Apache Iceberg, Delta Lake, or Apache Hudi) over cloud object storage to provide database-like ACID guarantees, metadata management, and time-travel.

Cloud Paradigm

  • Separation of Storage and Compute
  • ACID Transactions over Object Storage
  • Immutable Data Files with Snapshot Versioning
  • Optimistic Concurrency Control
  • Schema and Partition Evolution
  • Time-Travel and Data Versioning

Solution Flow

  1. Ingestion engines (Spark, Flink, or a streaming CDC pipeline) write raw Parquet/ORC data files into cloud object storage under a table root prefix.
  2. The table format writer (Iceberg, Delta, or Hudi) records each write as an atomic commit, generating manifest and metadata files that snapshot exactly which data files belong to the table at that version.
  3. The metadata layer maintains a linear or branched history of snapshots, enabling schema evolution, partition evolution, and column statistics without rewriting existing files.
  4. A catalog (AWS Glue, Nessie, Unity, or Hive Metastore) tracks the pointer to the current table metadata, serializing concurrent commits via optimistic concurrency control so conflicting writers retry rather than corrupt state.
  5. Query engines (Trino, Spark SQL, Snowflake, Athena) resolve the catalog pointer, prune files using manifest statistics, and read only the relevant Parquet — or read an older snapshot for time-travel and audit queries.
  6. Maintenance jobs periodically compact small files, expire stale snapshots, and rewrite manifests to keep read performance and storage cost bounded.

When to Use

  • Multiple engines or teams read and write the same large datasets concurrently.
  • You need UPSERT/MERGE and row-level deletes on data-lake-scale tables (GDPR erasure, CDC replication).
  • Auditing, reproducibility, or rollback requires querying historical table states.
  • Schemas evolve frequently and rewriting petabytes on every change is untenable.

When NOT to Use

  • Small datasets that fit comfortably in a managed OLTP or warehouse — the metadata overhead adds no value.
  • Pure append-only logs where a simpler partitioned-Parquet layout suffices.
  • Ultra-low-latency point lookups; these formats optimize analytical scans, not millisecond key access.

Trade-offs

  • ACID + concurrent writers vs the operational burden of running compaction and snapshot-expiry maintenance.
  • Time-travel and audit vs increased storage from retained historical snapshots.
  • Engine interoperability vs catalog lock-in risk if you pick a proprietary metastore.
  • Schema/partition evolution vs more complex metadata that can bottleneck on very high commit rates.

Real-World Example

A global ride-hailing company lands trip events from Kafka into an Apache Iceberg table on S3, partitioned by day. Their fraud team runs Flink MERGE jobs applying late-arriving corrections and GDPR delete requests, while an analytics team simultaneously runs Trino dashboards — neither blocks the other because Iceberg's optimistic commits serialize through the Glue catalog. When a bad pipeline release corrupts a day of data, engineers roll the table back to the prior snapshot in seconds and replay, avoiding a multi-hour restore from backup.

Additional Details

  • Commit conflicts: Optimistic concurrency retries only succeed when writers touch disjoint files; high-frequency concurrent MERGEs on the same partitions cause commit storms, so batch writes and prefer copy-on-write vs merge-on-read based on write/read ratio.
  • Small-file and manifest bloat: Streaming ingestion produces many tiny files that degrade scans; schedule compaction and manifest rewrites by table volume, not a fixed cron, or planning time balloons as manifests grow.
  • Snapshot expiry and orphans: Time-travel retention pins data files; run expire-snapshots plus orphan-file cleanup together, since aborted commits leave unreferenced files that expiry alone won't remove and that silently inflate storage cost.
  • Schema evolution safety: Rely on column-ID-based mapping so renames and reordering stay backward-compatible; avoid drop-then-re-add of a name, which breaks old snapshot reads. Partition-spec changes apply only to new data.
  • Delete-file accumulation: Merge-on-read positional/equality deletes pile up and slow reads until rewritten; monitor delete-file ratio per partition and trigger compaction accordingly.
  • Observability: Track commit retry counts, files-per-snapshot, average file size, manifest count, and snapshot age; alert on catalog pointer latency, which serializes every writer.

Security Controls

  • Catalog-based access control: Enforce table- and column-level grants through the catalog (Lake Formation, Unity Catalog) rather than raw object-store ACLs.
  • Encryption at rest: Enable server-side encryption with KMS-managed keys on the object-store bucket holding data and metadata files.
  • Snapshot immutability for audit: Retain and lock historical snapshots to provide a tamper-evident record of every table change.
  • Least-privilege write paths: Scope ingestion IAM roles to the specific table prefix and deny direct deletes outside the format's commit protocol.
  • Metadata integrity validation: Verify manifest and metadata file checksums to detect out-of-band tampering with the storage layer.
  • GDPR-compliant deletion: Use row-level delete and compaction to physically purge personal data on erasure requests within SLA.

Related Patterns