Lakehouse Architecture: Formats, Engines, and Trade-offs

Compare lakehouse table formats, catalogs, engines, and storage to understand their guarantees, compatibility limits, and operational trade-offs.

published: reading time: 19 min read author: Geek Workbench updated: November 22, 2026
Quick Summary

A lakehouse combines object storage with a table format that tracks schema, snapshots, and writes. Delta Lake and Apache Iceberg are both open table formats, but engine, catalog, protocol, and storage support determine which operations are safe and available. This guide compares those layers and gives a small workload for measuring schema changes, concurrent writes, deletes, and query latency on your own setup.

Lakehouse Architecture: Formats, Engines, and Trade-offs

Data warehouses made curated BI workloads easier to manage. Data lakes made it affordable to keep raw files for analytics and machine learning. Teams often copied data between them, then had to reconcile the two copies.

Lakehouse architecture puts a table format over files in object storage so multiple workloads can use managed schemas, snapshots, and transactional writes. It can reduce the need to copy every dataset into a separate warehouse, but it does not automatically provide warehouse-level latency, governance, or operational simplicity. Those depend on the table format, catalog, execution engine, storage service, and workload.

The format is only one layer

These terms describe different parts of the system:

Layer What it does What to verify
File format Stores columnar data, commonly as Parquet, ORC, or Avro. Compression, encoding, and reader support. A file format alone does not track table snapshots or coordinate writers.
Table format Tracks schemas, data files, snapshots, and commits. Delta Lake uses a transaction log; Iceberg stores table metadata and manifests. Which protocol or spec version is in use, and which features are enabled. A client that cannot read a table feature cannot safely use that table.
Catalog Maps a table name to its metadata and coordinates operations such as creating or committing a table. Catalog implementation, locking or commit behavior, permissions, and whether every client uses the same catalog.
Engine Plans and runs reads and writes, for example Spark or Trino. Support for the table’s format version and specific operations such as MERGE, row-level deletes, schema changes, or time travel.
Storage and cloud Holds data and metadata files and supplies the APIs used by catalogs and engines. Filesystem connector, credentials, consistency and atomic-operation assumptions, network path, and cloud-specific limits.

Delta Lake and Iceberg are both open table formats. That does not make every engine interchangeable: compatibility depends on the features recorded in a Delta protocol or Iceberg spec version, the catalog, and the engine’s implementation. For example, Delta’s compatibility guidance asks readers and writers to support the features enabled on a table, while Trino 484’s Iceberg connector documents support for Iceberg v1 and v2, with v3 experimental. Check the exact feature matrix for the clients you plan to run together.

Why the separation existed

Warehouses typically serve structured, curated data for reports and interactive queries. Their systems can enforce a schema as data is loaded and optimize storage for analytical scans.

Lakes keep raw or lightly processed files in lower cost storage. That leaves room for new uses, such as building machine-learning features from event logs, but consumers may each need their own parsing and validation rules.

Without a table format or other coordination layer, concurrent writes can leave incomplete outputs, and engines may need to list many files to plan a query. Those problems depend on the tools and storage setup; they are not an unavoidable property of every data lake.

The lakehouse solution

Table formats add metadata and commit rules around ordinary data files. Supported readers can see a consistent table snapshot while a writer publishes a new one. Schema validation and evolution are available, but the allowed changes and their APIs vary by format and engine. Time travel works only while the metadata and the data files for the requested snapshot remain available; retention and cleanup policies matter.

Production failure scenarios

Concurrent writes conflict

Two jobs read the same table snapshot and then update overlapping files. Delta Lake uses optimistic concurrency control: both jobs stage their output, then validate against commits that happened since their reads. One commit can succeed while the other fails with a conflict exception. That is a rejected write, not a partially committed table. Iceberg also detects conflicting commits, but retry behavior depends on its catalog and engine integration.

Mitigation: make write predicates narrow enough to isolate independent data where possible, and retry only operations that are safe to repeat. Record the engine, catalog, and exception in the retry log. Delta’s concurrency guide lists common conflict exceptions and explains why overlapping reads and writes can conflict.

Snapshot history outlives its data files

A user asks for a historical snapshot after a cleanup job has expired snapshots or vacuumed files that are no longer part of the current table. The metadata may still describe the old state, but the data files needed to read it can be gone. A compaction commit by itself should not be described as deleting history; retention cleanup is the step that can remove those old files.

Choose retention to match the recovery and audit window, then test a time-travel query after cleanup in a non-production table. Delta Lake’s VACUUM behavior and Iceberg’s snapshot expiration are separate mechanisms with format- and engine-specific commands. Keep any regulatory archive outside a table’s routine cleanup window.

A partition assumption hides a data-quality bug

Iceberg’s hidden partitioning lets a query filter on a logical column such as event_date; the engine uses table metadata to prune files written under the table’s partition specs. It does not make bad source values correct. If an upstream transformation assigns the wrong date or region, a query can return an incomplete but valid result because the stored values are wrong.

Compare partition-level counts with source totals, and inspect the plan when pruning is unexpectedly poor. When evolving a partition spec, remember that old and new layouts can coexist; Iceberg plans each layout from metadata rather than rewriting all historical files. See Iceberg’s partition evolution guide.

A clustering rewrite consumes more resources than expected

OPTIMIZE ... ZORDER BY rewrites files to improve locality for chosen filter columns. On a large table, the shuffle and rewrite can use substantial compute and storage bandwidth. High cardinality is not by itself a reason to avoid Z-ordering; it may help selective filters, but usefulness depends on statistics, file layout, data skew, and the other columns in the Z-order list. Delta’s Z-order guidance describes the trade-offs and notes that locality drops as more columns are added.

Test on a representative partition, compare bytes scanned and query time before and after, and cap concurrent maintenance work. Do not treat any cardinality threshold as universal.

Lakehouse architecture

flowchart TD
    subgraph Cloud[Cloud account]
        Catalog[Catalog service]
        subgraph ObjectStorage[Object storage]
            Delta[Delta table<br/>Parquet + _delta_log]
            Iceberg[Iceberg table<br/>Parquet + metadata]
        end
    end
    subgraph QueryEngines[Query Engines]
        Spark[Spark client]
        Trino[Trino connector]
        Other[Other compatible clients]
    end
    Catalog --> Delta
    Catalog --> Iceberg
    Spark --> Catalog
    Trino --> Catalog
    Other --> Catalog
    Spark --> ObjectStorage
    Trino --> ObjectStorage
    Other --> ObjectStorage

The catalog resolves table names and participates in metadata commits; the engine reads the format metadata and accesses the data files. A compatible client can share a table with other engines, but it must support the table’s protocol or spec features and use a compatible catalog and storage configuration.

Delta Lake in practice

Delta Lake is an open-source table format that stores transaction log metadata alongside data files, often Parquet. Its protocol defines transactional table state, but every reader and writer must support the features enabled on that table. The Delta Lake compatibility guide explains how protocol features affect client compatibility.

# Environment: Python 3.11, PySpark 4.0.0, and delta-spark 4.0.0.
# Install with: pip install pyspark==4.0.0 delta-spark==4.0.0
# The storage paths and catalog below must be configured for your environment.
from delta import configure_spark_with_delta_pip
from delta.tables import DeltaTable
from pyspark.sql import SparkSession

builder = SparkSession.builder \
    .appName("LakehousePipeline") \
    .config("spark.sql.extensions", "io.delta.sql.DeltaSparkSessionExtension") \
    .config("spark.sql.catalog.spark_catalog", "org.apache.spark.sql.delta.catalog.DeltaCatalog")
spark = configure_spark_with_delta_pip(builder).getOrCreate()

# Write to Delta table with schema enforcement
data = spark.read.json("s3://raw-events/clickstream/2025/03/")

data.write \
    .format("delta") \
    .mode("append") \
    .partitionBy("event_date") \
    .option("mergeSchema", "true") \
    .saveAsTable("gold.clickstream_events")

# Time travel query: read yesterday's version
yesterday = DeltaTable.forPath(spark, "s3://warehouse-bucket/gold/clickstream_events/")

yesterday_df = spark.read \
    .format("delta") \
    .option("timestampAsOf", "2025-03-26") \
    .load("s3://warehouse-bucket/gold/clickstream_events/")

Delta Lake records commits as JSON action files and can write Parquet checkpoints so readers can reconstruct table state without replaying every commit. See the Delta Transaction Log Protocol for the file and checkpoint formats. A Spark client also needs the right Delta protocol support and a compatible storage setup; a transaction log does not make an arbitrary object-store connector safe for concurrent commits.

Apache Iceberg

Apache Iceberg is an Apache-governed open table format. It tracks table state through metadata files, manifests, and snapshots. Its schema and partition evolution rules are part of the format, while the engine and catalog determine which operations are exposed and how commits are coordinated.

An Iceberg table is not automatically readable by every Iceberg-capable engine. The client must understand the table’s format version and enabled features. For example, Trino 484’s Iceberg connector supports spec versions 1 and 2, while version 3 support is experimental. It also requires a configured catalog and filesystem connector; its documentation lists Hive Metastore, AWS Glue, JDBC, REST, Nessie, and Snowflake catalog options.

-- Engine: Trino 484 with its Iceberg connector.
-- Assumes a Trino catalog named `lakehouse` and a compatible configured catalog service.
SELECT *
FROM lakehouse.production.analytics_events FOR VERSION AS OF 8954597067493422955
WHERE customer_id = 'CUST-001';

-- Or query the latest snapshot at or before a timestamp.
SELECT *
FROM lakehouse.production.analytics_events
FOR TIMESTAMP AS OF TIMESTAMP '2025-03-26 00:00:00';

Iceberg’s hidden partitioning lets a query filter on logical columns such as event_date without naming partition directories. The engine uses metadata to prune files for the table’s current and earlier partition specs. That depends on the engine implementing Iceberg’s metadata and transforms correctly; inspect the query plan and test each client when you evolve a partition layout.

Query performance: closing the gap

Lakehouse query speed depends on the engine, storage path, table layout, cache state, and query. These techniques can help, but they do not guarantee warehouse latency.

Data skipping uses column statistics stored with table metadata. A query filtering on country = 'Germany' may skip files whose recorded value bounds cannot match the predicate. Effectiveness depends on those statistics being collected and on how the data is laid out.

File caching can keep frequently accessed data in local storage or memory. Whether it is available, enabled, and effective depends on the engine or managed service; it does not eliminate all object-storage latency.

Compaction consolidates small files into larger ones. There is no universal ideal Parquet file size: choose a target from the engine, storage, and query workload, then measure planning overhead and scan performance. Delta Lake’s OPTIMIZE uses snapshot isolation, but maintenance still consumes compute and storage bandwidth.

Delta Lake Z-ordering can co-locate records to improve data skipping for selective predicates. It is a rewrite, and its benefit depends on collected statistics, file layout, and the chosen columns; it is not a general clustering feature shared by all lakehouse formats.

-- Engine: Apache Spark 4.0.x with Delta Lake 4.0.0.
-- This command is Delta-specific; the table and catalog must already exist.
OPTIMIZE events
WHERE event_date >= '2025-01-01'
ZORDER BY (customer_id, session_id);

Lakehouse trade-offs

Concern Delta Lake Apache Iceberg What decides the result
Table state Transaction log with protocol versions and optional table features. Metadata files, manifests, snapshots, and spec versions. The client must support every feature enabled on the table.
Schema evolution Supported, with operation and feature details depending on the Delta client and protocol. Supported through field IDs and metadata changes; operation support varies by engine. Test the actual change with every reader and writer.
Deletes and updates DELETE, UPDATE, and MERGE are available in supported clients; some tables use optional features such as deletion vectors. Row-level deletes use spec features and engine-specific rewrite or delete-file behavior. Confirm table version and client support, then measure write amplification.
Partition evolution Supported capabilities depend on Delta implementation and client; do not assume another format’s semantics. New partition specs can coexist with older layouts; old files are not rewritten automatically. Check the engine’s DDL and how it plans mixed layouts.
Catalog and commits Log-store and catalog support depend on the storage system and client. Trino 484 supports several catalog types, each with its own setup and commit path. Choose one catalog strategy and verify all writers use it consistently.
Portability Open source, but protocol features and connector coverage vary. Open source, but spec versions and operations vary by connector. Test your exact engines, versions, catalog, cloud, and table features together.

Start with the engines and managed services the team must use, then check their current format and catalog support. Delta Lake can fit a Spark-centered platform; Iceberg’s partition evolution may help when layouts need to change. Neither choice removes the need to test client compatibility, storage permissions, commit behavior, and operations on the target cloud.

Compare formats with a small workload

This local test uses the same Spark 4.0.0 process for Delta Lake 4.0.0 and Iceberg 1.12.0. The versions are pinned in the Delta Lake Spark compatibility guide and Iceberg Spark runtime documentation. It tests mechanics on a local filesystem, not cloud performance. Repeat it with the catalog, cloud storage connector, credentials, and workload shape you expect to run in production.

Start spark-sql with both table-format extensions and a local Iceberg Hadoop catalog:

# Spark 4.0.0, Scala 2.13; Delta Lake 4.0.0; Iceberg 1.12.0.
spark-sql \
  --packages io.delta:delta-spark_2.13:4.0.0,org.apache.iceberg:iceberg-spark-runtime-4.0_2.13:1.12.0 \
  --conf spark.sql.extensions=io.delta.sql.DeltaSparkSessionExtension,org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions \
  --conf spark.sql.catalog.spark_catalog=org.apache.spark.sql.delta.catalog.DeltaCatalog \
  --conf spark.sql.catalog.ice=org.apache.iceberg.spark.SparkCatalog \
  --conf spark.sql.catalog.ice.type=hadoop \
  --conf spark.sql.catalog.ice.warehouse=file:///tmp/lakehouse-bench/iceberg

Create equal tables with 100,000 rows. Run the schema change on both, then start two independent Spark clients at the same time. Client A appends IDs 100,000–104,999; client B appends IDs 105,000–109,999. Run the two writer-a inserts from one client and the matching writer-b inserts from the other, for both tables. Record commit success, conflict errors, and retry behavior.

CREATE NAMESPACE IF NOT EXISTS ice.bench;

CREATE TABLE delta.`/tmp/lakehouse-bench/delta-events` USING DELTA AS
SELECT id, CAST(id % 1000 AS INT) AS tenant_id, CAST(id % 10 AS INT) AS event_type
FROM range(0, 100000);

CREATE TABLE ice.bench.events USING iceberg AS
SELECT id, CAST(id % 1000 AS INT) AS tenant_id, CAST(id % 10 AS INT) AS event_type
FROM range(0, 100000);

ALTER TABLE delta.`/tmp/lakehouse-bench/delta-events` ADD COLUMNS (source STRING);
ALTER TABLE ice.bench.events ADD COLUMNS (source STRING);

-- Run these inserts from separate clients at the same time.
INSERT INTO delta.`/tmp/lakehouse-bench/delta-events`
SELECT id, CAST(id % 1000 AS INT), CAST(id % 10 AS INT), 'writer-a'
FROM range(100000, 105000);

INSERT INTO ice.bench.events
SELECT id, CAST(id % 1000 AS INT), CAST(id % 10 AS INT), 'writer-a'
FROM range(100000, 105000);

-- Client B uses range(105000, 110000) and source 'writer-b'.

For client B, run the same two inserts with range(105000, 110000) and source 'writer-b'. After both writers finish, delete every hundredth row and compare the remaining counts; both should contain 108,900 rows. For query latency, warm each table once, then time the same selective aggregate 20 times in the same Spark session. Record median and p95 duration, bytes scanned, and whether the run was warm or cold; do not compare a cold run for one format with a cached run for the other.

DELETE FROM delta.`/tmp/lakehouse-bench/delta-events` WHERE id % 100 = 0;
DELETE FROM ice.bench.events WHERE id % 100 = 0;

SELECT COUNT(*) FROM delta.`/tmp/lakehouse-bench/delta-events`
WHERE tenant_id = 17 AND event_type = 3;

SELECT COUNT(*) FROM ice.bench.events
WHERE tenant_id = 17 AND event_type = 3;

Use a small Python timing loop in that same PySpark session so process startup is not part of the query time:

# Python 3.11 with the Spark 4.0.0 session configured above.
import math
import statistics
import time

def measure_ms(query):
    spark.sql(query).collect()  # warm up
    samples = []
    for _ in range(20):
        started = time.perf_counter()
        spark.sql(query).collect()
        samples.append((time.perf_counter() - started) * 1000)
    samples.sort()
    p95 = samples[math.ceil(0.95 * len(samples)) - 1]
    return statistics.median(samples), p95

for name, query in {
    "delta": "SELECT COUNT(*) FROM delta.`/tmp/lakehouse-bench/delta-events` WHERE tenant_id = 17 AND event_type = 3",
    "iceberg": "SELECT COUNT(*) FROM ice.bench.events WHERE tenant_id = 17 AND event_type = 3",
}.items():
    median_ms, p95_ms = measure_ms(query)
    print(f"{name}: median={median_ms:.1f} ms, p95={p95_ms:.1f} ms")

This setup tests whether the selected versions can perform each operation. It does not establish that one format is faster or more reliable in general. Repeat with production sized data and cloud storage before making an architecture decision.

Capacity estimation

Estimate log and data-file storage from measurements on a representative table. Commit size varies with how many files a write adds or removes, and file-size targets are workload choices rather than universal defaults.

# Python 3.11 standard library; illustrative inputs, not Delta Lake defaults.
commits_per_day = 1000
avg_commit_kb = 12  # measure on a representative table
retention_days = 30
log_size_mb = commits_per_day * avg_commit_kb * retention_days / 1024

print(f"Estimated retained commit data: {log_size_mb:.1f} MB")

# Compare file counts using a measured average and a chosen target size.
total_data_gb = 1_000_000  # illustrative 1 PB table
observed_avg_file_gb = 0.128  # replace with a measurement
chosen_target_file_gb = 1  # choose for your engine and workload
file_count_before = total_data_gb / observed_avg_file_gb
file_count_after = total_data_gb / chosen_target_file_gb

print(f"Estimated files before rewrite: {file_count_before:,.0f}")
print(f"Estimated files after rewrite: {file_count_after:,.0f}")
print(f"Estimated reduction: {(1 - file_count_after/file_count_before)*100:.0f}%")

Treat this as a planning estimate, not a sizing guarantee. Check commit history, checkpoints, data-file sizes, and format-specific cleanup policies separately. For Delta Lake, configure log retention and deleted-file retention for their different purposes; time travel needs the referenced data files as well as metadata.

The modern lakehouse stack

Teams sometimes organize data into bronze, silver, and gold layers. These names describe a workflow convention, not a guarantee supplied by a table format. A bronze layer can retain source data, a silver layer can hold validated records, and a gold layer can serve curated datasets for analytics. The owner still defines retention, quality checks, and access rules.

# Engine: Spark 4.0.x with Delta Lake 4.0.0 and
# spark-sql-kafka-0-10_2.13:4.0.0. Configure cloud storage, catalog
# access, and the target databases for your deployment.
# Example medallion pipeline.
raw_events = spark.readStream.format("kafka") \
    .option("kafka.bootstrap.servers", "broker:9092") \
    .option("subscribe", "clickstream") \
    .load()

raw_events.writeStream \
    .format("delta") \
    .outputMode("append") \
    .option("checkpointLocation", "s3://chkpts/bronze/events/") \
    .table("bronze.clickstream_raw")

# Silver: cleaning and deduplication
spark.sql("""
    MERGE INTO silver.clickstream_events AS target
    USING (
        SELECT *, ROW_NUMBER() OVER (PARTITION BY event_id ORDER BY event_time DESC) AS rn
        FROM bronze.clickstream_raw
    ) AS source
    ON target.event_id = source.event_id
    WHEN NOT MATCHED THEN INSERT *
""")

# Gold: business aggregations
spark.sql("""
    CREATE OR REPLACE TABLE gold.daily_customer_activity AS
    SELECT
        customer_id,
        DATE(event_time) AS activity_date,
        COUNT(*) AS event_count,
        COUNT(DISTINCT session_id) AS sessions
    FROM silver.clickstream_events
    GROUP BY customer_id, DATE(event_time)
""")

The streaming source in this snippet uses Spark’s Kafka connector; configure its package with the Spark version shown above.

When lakehouse makes sense

Lakehouse isn’t always the right choice. For straightforward BI workloads where data is well-understood and query latency is critical, a native cloud data warehouse (Snowflake, BigQuery, Redshift) remains simpler to operate. The lakehouse’s flexibility comes with complexity that not every team needs.

A lakehouse can fit when BI, data science, and machine-learning workloads need access to shared files, or when raw data must remain available for reprocessing. It asks the platform team to manage catalogs, storage permissions, table maintenance, and compatibility across engines.

A hybrid can also work: keep shared tables in a lakehouse format and use a managed warehouse for selected workloads. Before moving a workload between engines, verify support for the table’s protocol features, catalog, and storage path; shared files do not guarantee that a query can move unchanged.

Lakehouse observability

Track these metrics to keep lakehouse tables healthy:

# Engine: Spark 4.0.x with Delta Lake 4.0.0; the table path must be accessible to Spark.
# Key lakehouse metrics to monitor
lakehouse_metrics = {
    # Table health
    "file_count": "Track against the table's measured planning cost",
    "avg_file_size_mb": "Track distribution against the workload baseline",
    "pending_commits": "Track commit retries and latency by engine and catalog",
    "last_commit_timestamp": "Alert if stale > expected batch interval",

    # Storage
    "total_table_size_gb": "Track growth over time",
    "removed_files_size_gb": "Monitor vacuum effectiveness",

    # Query performance
    "p99_query_duration_sec": "Baseline and alert on regression",
    "bytes_scanned_per_query": "Detect full table scans on large tables"
}

# Example: Delta Lake table metrics query
delta_stats = spark.sql("""
    DESCRIBE DETAIL delta.`s3://lake/gold/clickstream_events/`
""").collect()[0]

print(f"File count: {delta_stats.numFiles}")
print(f"Table size: {delta_stats.sizeInBytes / 1024**3:.1f} GB")
print(f"Partition count: {len(delta_stats.partitionColumns)}")

Set alert thresholds from the table’s query plans, file-size distribution, write rate, and recovery objectives. A single file-count or file-size threshold does not fit every engine or table.

Lakehouse anti-patterns

Treating a table format as a data-management plan. Transactions do not replace clear ownership, naming, retention, and catalog rules. Define those alongside the format, or teams will still struggle to find and trust datasets.

Running compaction too aggressively. Frequent compactions consume compute resources that could go toward useful work. If your workload is append-only (log data, events), small files are less of a problem because queries tend to be recent-time-scoped. Compact less frequently and monitor actual query patterns before tuning.

Assuming partition evolution rewrites old data. Iceberg keeps files written under earlier specs and writes new files using the new spec. Verify that each engine plans both layouts as expected, and rewrite old files only when the workload justifies that cost.

Conclusion

Lakehouse tables can reduce duplicate storage and support multiple workloads over shared files. The trade is operational work: teams still need to choose a catalog, keep client features compatible, manage storage permissions, and test maintenance and recovery procedures. Delta Lake and Iceberg are both open formats, but the exact table features and managed-service integrations differ. Pick the system your required engines support, then measure it on the cloud and workload you will use.

Quick recap

  • A table format adds snapshots and commit metadata around data files; it does not guarantee warehouse latency or remove operational work.
  • Delta Lake and Iceberg are open formats, but each engine must support the table’s protocol or spec version, catalog, and enabled features.
  • Schema evolution, deletes, partition changes, and time travel vary by client and version. Test them with the exact engines that will read and write the table.
  • Z-ordering and compaction rewrite data. Measure bytes scanned, query latency, and maintenance cost on a representative workload.
  • Time travel requires both metadata and historical data files to remain available. Set retention and cleanup policies to match recovery needs.

For foundational warehouse concepts, see data warehouse architecture. For the storage layer underneath a lakehouse, read about data lakes.

Category

Related Posts

AWS Data Services: Kinesis, S3, Glue, Athena, Redshift

Follow an order event from Kinesis Data Streams through S3 to Athena or Redshift, adding Glue when transformation or shared catalog metadata helps.

#data-engineering #aws #kinesis

Azure Data Pipelines with Event Hubs and Synapse

Follow live events and scheduled data through Azure processing, Data Lake Storage Gen2, and Synapse, with a clear choice between stream and batch paths.

#data-engineering #azure #data-factory

Data Lake Architecture: Storage and Workload Choices

Learn how data lakes organize analytical data, choose partitions and table formats, and plan retention, access, quality, and cost controls.

#data-engineering #data-lake #data-storage