Big Data Platforms & the Lakehouse
- Choose between a warehouse, a data lake and a lakehouse for a given bank or e-commerce company
- Explain how an open table format gives you atomic commits, time travel and schema/partition evolution on object storage
- Design an end-to-end platform: CDC and event ingestion, medallion layers, engines, catalog, orchestration, quality and lineage
- Apply governance to a lake: PII tokenization, masking, right to erasure, retention, BCBS 239 and Vietnamese data rules
- Diagnose small files, bad partitioning and missing compaction
TL;DR
- OLTP serves small row-level transactions; OLAP scans a few columns over billions of rows. Never run analytics on the ledger database: copy changes out with CDC.
- Lakehouse = Parquet files on object storage + an open table format (Iceberg, Delta Lake, Hudi) for atomic commits and snapshots + a catalog + many engines over one copy. A managed warehouse is still simpler for a small, SQL-only team with no residency obstacle.
- As of 2026, Iceberg is the common interchange format: spec v3 (deletion vectors, row lineage, variant…) is adopted, v4 is in development, and both Apache Polaris and Unity Catalog OSS implement the Iceberg REST catalog API.
- Ingestion: Debezium → Kafka → Flink or Kafka Connect → bronze;
MERGEinto silver; gold marts per business question. Streaming and batch share the same tables. - Deletes are logical first: the bytes are gone only after files are rewritten, old snapshots expire and orphans are removed. Tokenize PII at ingestion so most tables never hold it.
- Performance and cost are mostly file layout: coarse time partitions, files of roughly 128–512 MB, scheduled compaction and sorting, separate compute per workload.
Why it matters
- Bank: regulatory and risk reports, reconciliation analytics, AML and fraud models. Every number must trace back to the ledger and be reproducible months later, without exposing national ID numbers to every analyst — usually on infrastructure in Vietnam.
- E-commerce: clickstream volume dwarfs orders, recommendations need months of history, and on 11.11 leadership wants GMV per minute while finance wants exact totals the next morning.
- Scope: processing models (windows, watermarks, exactly-once streaming) are in Batch & Stream Processing; this page is about the platform underneath.
Core concepts
OLTP vs OLAP
| OLTP | OLAP | |
|---|---|---|
| Typical query | SELECT … WHERE account_id = ? | SUM(amount) GROUP BY branch, month over 2 years |
| Layout | Row pages, B-tree indexes | Columnar files with min/max statistics |
| Latency, concurrency | Milliseconds, thousands of users | Seconds, tens of analysts |
| Modelling | Normalized, one service per schema | Star schemas or wide tables across domains |
A read replica is not an analytics platform: long scans conflict with WAL replay, row storage reads every column, and you still cannot join data owned by forty services. See Storage Engines: B-Tree vs LSM.
Warehouse, lake, lakehouse
- Warehouse (Snowflake, BigQuery, Redshift, on-prem Teradata or Oracle): storage and compute managed together, SQL first, governance built in, data in the vendor's format.
- Data lake (HDFS, then object storage): cheap open files, any engine, but no transactions — half-written partitions are visible, updates and deletes are impractical, and nobody knows which files are current.
- Lakehouse: keep the open files and add a table format, a metadata layer that records which files form each table version and commits it atomically. Spark, Flink, Trino, DuckDB and the warehouses themselves read the same tables.
The lakehouse won mindshare because one copy serves BI, ML and streaming, storage and compute scale separately, open formats reduce lock-in (as of 2026 the major warehouses can read or write Iceberg — verify features per vendor), and a bank that cannot use an offshore SaaS can build it on-prem or in a domestic cloud. A warehouse is still simpler for three analysts and an hourly dashboard on a few terabytes: a lakehouse means owning catalogs, compaction, policies and upgrades.
Columnar files: Parquet and ORC
A Parquet file holds row groups (commonly around 128 MB); each column is a compressed column chunk, and the footer stores per-chunk min/max statistics. A query reads only the columns it needs (projection pruning) and skips row groups whose ranges cannot match the filter (predicate pushdown) — effective only if data is sorted or clustered. Files are immutable: every change writes new files. ORC is the Hive-era equivalent; new platforms default to Parquet.
Open table formats
Iceberg answers "which files are silver.orders at version 42?" with a metadata tree:
- Commit = atomic pointer swap. The writer writes data files, manifests and a new metadata file, then the catalog swaps v41 → v42 with compare-and-swap. Readers see a whole snapshot, never half a write; a losing concurrent writer refreshes and retries.
- Snapshots, time travel, tags and branches. Query any retained snapshot; tags pin one (e.g. a filed report), branches isolate writes until a fast-forward.
- Schema evolution by column id: add, drop, rename and widen without rewriting files.
- Hidden partitioning: declare
days(event_time)orbucket(32, order_id); users filter onevent_timeand Iceberg prunes. Partition evolution changes the layout for new data only, as metadata. - Row-level changes. Copy-on-write rewrites every file containing a changed row (slow writes, fastest reads; Iceberg's default). Merge-on-read writes small delete files — position deletes, equality deletes or, in v3, deletion vectors — that readers merge until compaction.
Iceberg spec (as of 2026): v2 added row-level deletes; v3 adds deletion vectors, row lineage (stable row ids, last-updated snapshot), variant, geospatial and nanosecond-timestamp types, column defaults, multi-argument transforms and encryption keys; v4 (metadata restructuring, no new equality deletes) is still in development. Engine support for v3 varies — Trino calls it experimental — so check every writer before upgrading a table.
| (as of 2026, verify) | Apache Iceberg | Delta Lake | Apache Hudi |
|---|---|---|---|
| Metadata | Manifest tree, pointer in catalog | Ordered JSON log (_delta_log) + checkpoints | Timeline + metadata table, record index |
| Strength | Broadest multi-engine support, REST catalog standard | Spark/Databricks integration, UniForm for Iceberg readers | Upsert-heavy ingestion, built-in table services |
| Current line | Spec v3, Java library 1.12 | Delta 4.4 on Spark 4.x | Hudi 1.2 |
| Fit | Default for a new platform | Databricks shops | Existing Hudi CDC pipelines |
Catalogs
The catalog maps a table name to its current metadata, performs the atomic commit, and holds governance: table, column and row policies, and short-lived storage credentials for engines. Options: Hive Metastore and AWS Glue (legacy); the Iceberg REST catalog spec (any engine, any compliant catalog); Apache Polaris (an Iceberg REST catalog, Apache top-level project since early 2026); Unity Catalog OSS (LF AI & Data sandbox project, Delta and Iceberg, exposes the Iceberg REST API). Because every write passes through it, the catalog needs HA, backups and DR consistent with the object store.
Compute engines
| Engine (as of 2026) | Best at | Typical use |
|---|---|---|
| Spark 4.x (4.2 latest) | Large batch ETL, MERGE, ML pipelines | Silver/gold builds, backfills, compaction |
| Flink 2.x (2.3 latest; 1.20 LTS) | Continuous ingestion, CDC upserts, state | Kafka → Iceberg, streaming features |
| Trino | Interactive SQL across many tables and sources | Analysts, BI, federation |
| DuckDB | In-process, single-node analytics | Notebooks, tests, small marts |
| ClickHouse / StarRocks | Sub-second queries at high concurrency on fresh data | Live dashboards, user-facing analytics |
Choose by latency, concurrency and write pattern: typically Flink ingests, Spark transforms on a schedule, Trino serves analysts, and a real-time OLAP store exists only where many viewers need seconds-level freshness.
Ingestion and medallion layers
CDC. Debezium reads the PostgreSQL WAL or MySQL binlog into one Kafka topic per table, keyed by primary key (slot and contract pitfalls: Transactional Outbox & CDC). Into the lake:
- Flink upsert sink (
write.upsert.enabled, identifier fields required): commits every checkpoint, but writes equality deletes that slow reads until compacted. - Iceberg Kafka Connect sink: exactly-once, central commit coordinator (default interval 5 minutes), Debezium transforms.
- Append to bronze,
MERGEinto silver with scheduled Spark: easiest to audit and replay; latency equals the schedule.
Kafka 4.0 (March 2025) removed ZooKeeper (KRaft only), and tiered storage has been production-ready since 3.9, so weeks of retention for replay are affordable (Message Queues & Event Streaming). Clickstream goes through a collector API that validates the schema, stamps server time, checks event_id and tokenizes user ids before producing to Kafka; silver dedupes by event_id.
| Layer | Contents | Rules |
|---|---|---|
| Bronze | Raw CDC and events, append-only | Restricted access, short PII retention, replay source |
| Silver | Cleaned, deduplicated current-state tables, PII tokenized | Contracts and quality checks, domain-owned |
| Gold | Marts and features: exposure per branch, GMV per category | Semantic definitions, tagged for reports |
Lambda vs Kappa in 2026 terms: with table formats the shape is one storage layer, two cadences — streaming keeps silver minutes-fresh, scheduled batch rebuilds gold for authoritative numbers, and a bug fix is a backfill from retained bronze.
Concurrent writers are where the format earns its keep:
Compaction competing with a high-frequency upsert stream keeps losing commits: compact partitions that are no longer hot.
Organising the platform
- Data mesh vs central platform. Mesh (Zhamak Dehghani) means domain ownership, data as a product, self-serve platform, federated governance. Banks usually land in between: a platform team runs the infrastructure and policies; domains (cards, lending, payments) own their data products.
- Data contracts: schema, field meanings, freshness SLA, quality rules, owner and PII class, enforced by the schema registry and contract tests in the producer's CI, so a column rename breaks a build, not a regulatory report.
- Orchestration: Airflow 3 (April 2025; 3.3 as of October 2026) added DAG versioning, assets and scheduler-managed backfills; Dagster is asset-centric. Either way: idempotent tasks per partition, retries, SLAs, backfills.
- Data quality: schema, nulls, key uniqueness, freshness, volume and control totals (today's silver transactions sum to the ledger's day-end total). Use write-audit-publish: write to an Iceberg branch, check, then
fast_forwardmain. - Lineage: OpenLineage, an open standard for run, job and dataset events, with integrations for Airflow, Spark, Flink and dbt; Marquez is the reference implementation.
- Semantic layer: one governed definition of GMV or NPL ratio for every BI tool, instead of five GMVs in five dashboards.
Governance and privacy for banks
- Classify columns in the catalog (PII, sensitive, card data) and propagate tags via lineage; card numbers should never reach the lake (Compliance: PCI DSS, KYC/AML, Data Protection).
- Tokenize at ingestion: national ID, phone and email become vault tokens (deterministic, so joins still work); re-identification is a separate audited service.
- Column masking and row-level security defined once in the catalog: support sees
090****123, a branch manager sees only that branch's rows. - Retention and audit: retention per table aligned with law (AML and accounting records for years, raw clicks far less); log who read which sensitive columns.
Right to erasure in an append-only lake. A DELETE writes a deletion vector; the old Parquet file and old snapshots still hold the row. Physical removal is a chain:
- Routine Iceberg compaction will not rewrite a 512 MB file for one deleted row (default
delete-ratio-threshold0.3); erasure needs a targeted rewrite. - Tagged snapshots are not expired, so never tag tables that hold personal data.
- Delta is similar: deletion vectors, then
REORG TABLE … APPLY (PURGE), thenVACUUM. - Crypto-shredding covers stores you cannot rewrite: per-customer keys, delete the key.
- Records other laws require you to keep (AML, accounting) are restricted, not deleted — confirm with legal.
BCBS 239 (Basel Committee, 2013; G-SIBs from 2016, supervisors encouraged to extend it to domestic systemically important banks) sets 14 principles across governance and infrastructure, risk data aggregation (accuracy, completeness, timeliness, adaptability), risk reporting, and supervisory review. On the platform that means automated pipelines, lineage from report cell to source, reconciliation to the general ledger, and tagged snapshots that reproduce each report. It is a Basel standard, not Vietnamese law; check how SBV and your bank's Basel programme apply it.
Vietnam (verify with legal): the Law on Personal Data Protection 91/2025/QH15 and Decree 356/2025/ND-CP apply from 1 January 2026, including deletion and consent-withdrawal rights and cross-border transfer rules. Data localization came from the 2018 Cybersecurity Law and Decree 53/2022/ND-CP (in force 1 October 2022); the new Law on Cybersecurity 116/2025/QH15 replaced the 2018 law on 1 July 2026 and, per law-firm summaries, keeps localization, with implementing decrees to follow. Design for primary storage and compute in Vietnam, and treat any offshore copy as a cross-border transfer.
Performance and cost
- Partitioning: by time at a grain that yields large files (day, or hour at very high volume), optionally plus a bucket; never by
customer_id(Partitioning & Sharding in Practice). - Small files: 50 writers committing every minute into 24 hourly partitions produce thousands of tiny files per hour — slow planning, bloated manifests, request costs. Fix with hash distribution (fewer writers per partition), longer commit intervals and compaction to the target size (Iceberg default 512 MB).
- Clustering: sort by common filters, or Z-order two to four columns, so min/max statistics skip files; Delta offers liquid clustering.
- Caching and isolation: engine file caches and pre-aggregated gold tables for popular dashboards; separate, autoscaled clusters for ETL, BI and data science over the same tables.
| Cost driver (approximate) | Inflated by | Lever |
|---|---|---|
| Compute, usually the largest | Full scans, skewed joins, idle clusters | Pruning, clustering, autoscaling |
| Storage | Retained snapshots, per-team copies | Expiration, retention per layer |
| Object-store requests | Small files | Compaction, manifest rewrites |
| Network | Cross-zone or cross-region reads | Co-locate compute and storage |
Object storage costs a few US cents per GB-month at list price (approximate; verify for your provider and region); the surprise is usually compute and requests.
Use cases
- Clickstream and recommendations: bronze clicks → silver sessions (deduped, bots removed) → gold features such as 30-day category affinity, trained with point-in-time joins.
- Flash-sale dashboards: Kafka into StarRocks or ClickHouse per-minute aggregates for GMV and stock burn-down; exact totals next morning from gold (Flash Sale System).
- Fraud feature store: Iceberg history as offline store, Redis as online store, served features logged (Real-time Fraud Detection Pipeline).
- Regulatory reporting and reconciliation: gold per business date, checked against GL control totals, tagged at submission (Reconciliation & Settlement).
Trade-offs
| Option | Strengths | Weaknesses | Choose when |
|---|---|---|---|
| Managed warehouse | Fast start, little ops | Lock-in, residency limits, cost at scale | Small SQL-only team, residency allows |
| Lakehouse | One open copy, many engines, on-prem possible | You run catalog, compaction, policies | Streaming, multi-engine, residency limits |
| Copy-on-write | Fastest reads | Costly frequent updates | Append-mostly tables, gold |
| Merge-on-read | Cheap updates and deletes | Read-time merging until compaction | CDC current-state tables |
| Flink upsert | Minute-level freshness | Equality deletes, compaction conflicts | Near-real-time silver |
Bronze append + MERGE | Simple, replayable, auditable | Latency = schedule | Regulated banking tables |
| Data mesh on shared platform | Domain ownership scales | Needs mature domains | Many domains with data engineers |
In practice
Silver table and an hourly CDC MERGE (Spark SQL with the Iceberg runtime; lake is a REST catalog; bronze.orders_cdc holds Debezium's op, the row's columns, source_lsn and ingested_at, partitioned by hours(ingested_at)):
CREATE TABLE lake.silver.orders (
order_id BIGINT NOT NULL,
customer_tok STRING, -- token, never the raw national ID or phone
status STRING,
total_minor BIGINT, -- minor units (whole dong for VND)
currency STRING,
updated_at TIMESTAMP,
source_lsn BIGINT -- PostgreSQL LSN from Debezium's source block
) USING iceberg
PARTITIONED BY (bucket(32, order_id)) -- not by updated_at: an update would move the row
TBLPROPERTIES (
'format-version' = '3',
'write.merge.mode' = 'merge-on-read',
'write.update.mode' = 'merge-on-read',
'write.delete.mode' = 'merge-on-read'
);
-- Iceberg rejects a MERGE where several source rows match one target row,
-- so keep the latest change per key. The LSN guard makes replays harmless.
MERGE INTO lake.silver.orders t
USING (
SELECT order_id, customer_tok, status, total_minor, currency, updated_at, source_lsn, op
FROM (
SELECT c.*,
ROW_NUMBER() OVER (PARTITION BY order_id ORDER BY source_lsn DESC) AS rn
FROM lake.bronze.orders_cdc c
WHERE ingested_at >= TIMESTAMP '2026-10-17 10:00:00'
AND ingested_at < TIMESTAMP '2026-10-17 11:00:00'
) latest
WHERE rn = 1
) s
ON t.order_id = s.order_id
WHEN MATCHED AND s.op = 'd' AND s.source_lsn > t.source_lsn THEN DELETE
WHEN MATCHED AND s.source_lsn > t.source_lsn THEN UPDATE SET
customer_tok = s.customer_tok, status = s.status, total_minor = s.total_minor,
currency = s.currency, updated_at = s.updated_at, source_lsn = s.source_lsn
WHEN NOT MATCHED AND s.op <> 'd' THEN
INSERT (order_id, customer_tok, status, total_minor, currency, updated_at, source_lsn)
VALUES (s.order_id, s.customer_tok, s.status, s.total_minor, s.currency, s.updated_at, s.source_lsn);
One gap: replaying an hour older than a delete can re-insert the order, because no target row is left to compare LSNs with. If replays are routine, soft-delete in silver and purge later.
Tags, time travel and maintenance:
-- Pin the snapshot a regulatory report was built from, beyond normal expiration.
ALTER TABLE lake.gold.daily_exposure CREATE TAG `report_2026_09_30` RETAIN 3650 DAYS;
SELECT branch_code, SUM(exposure_minor) AS exposure
FROM lake.gold.daily_exposure VERSION AS OF 'report_2026_09_30'
WHERE business_date = DATE '2026-09-30'
GROUP BY branch_code;
SELECT * FROM lake.silver.orders TIMESTAMP AS OF '2026-10-17 01:00:00'
WHERE order_id = 981234;
-- Clickstream grew 20x: hourly partitions for new data, metadata-only.
ALTER TABLE lake.silver.clicks REPLACE PARTITION FIELD event_time_day WITH hours(event_time);
-- Compact and cluster yesterday's files.
CALL lake.system.rewrite_data_files(
table => 'silver.clicks',
strategy => 'sort',
sort_order => 'zorder(user_tok, product_id)',
where => 'event_time >= "2026-10-17" AND event_time < "2026-10-18"');
-- Erasure path: rewrite every file carrying a delete, expire, clean up.
CALL lake.system.rewrite_data_files(
table => 'silver.customers',
options => map('delete-file-threshold', '1'));
CALL lake.system.expire_snapshots(
table => 'silver.customers',
older_than => TIMESTAMP '2026-10-11 00:00:00',
retain_last => 10);
CALL lake.system.remove_orphan_files(table => 'silver.customers');
Your erasure SLA is roughly rewrite cadence + snapshot retention (7 days here) + cleanup cadence; get legal to accept that number.
If you ingest from Go rather than Kafka Connect or Flink, the essentials are flush by size or age, and commit the table before the offsets:
package lakeingest
import (
"bytes"
"context"
"fmt"
"time"
"github.com/parquet-go/parquet-go"
)
type ClickEvent struct {
EventID string `parquet:"event_id"`
UserTok string `parquet:"user_tok"` // token, never a raw phone or email
EventTimeMs int64 `parquet:"event_time_ms"`
}
// Table uploads one file and appends it to the table in one catalog commit.
type Table interface {
AppendFile(ctx context.Context, name string, data []byte, rows int) error
}
// Batcher buffers events into large Parquet files. Use it from the poll loop
// only, and call Flush when partitions are revoked.
type Batcher struct {
MaxRows int // tune so compressed files land near the target size
MaxAge time.Duration // a quiet topic still flushes
Table Table
CommitOffsets func(ctx context.Context) error
rows []ClickEvent
firstAt time.Time
}
func (b *Batcher) Add(ctx context.Context, e ClickEvent, now time.Time) error {
if len(b.rows) == 0 {
b.firstAt = now
}
b.rows = append(b.rows, e)
return b.Tick(ctx, now)
}
// Tick flushes when the batch is big enough or old enough.
func (b *Batcher) Tick(ctx context.Context, now time.Time) error {
if len(b.rows) == 0 || (len(b.rows) < b.MaxRows && now.Sub(b.firstAt) < b.MaxAge) {
return nil
}
return b.Flush(ctx, now)
}
func (b *Batcher) Flush(ctx context.Context, now time.Time) error {
if len(b.rows) == 0 {
return nil
}
var buf bytes.Buffer
w := parquet.NewGenericWriter[ClickEvent](&buf, parquet.Compression(&parquet.Zstd))
if _, err := w.Write(b.rows); err != nil {
return fmt.Errorf("encode parquet: %w", err)
}
if err := w.Close(); err != nil {
return fmt.Errorf("close parquet: %w", err)
}
// New name per attempt: never overwrite a file a snapshot may reference.
name := fmt.Sprintf("clicks-%d.parquet", now.UnixNano())
if err := b.Table.AppendFile(ctx, name, buf.Bytes(), len(b.rows)); err != nil {
return fmt.Errorf("append %s: %w", name, err) // keep rows, retry on next Tick
}
b.rows = b.rows[:0]
// Offsets after the table commit: a crash in between replays the batch
// (at-least-once), so silver deduplicates by event_id.
return b.CommitOffsets(ctx)
}
Common pitfalls
- Reports on the OLTP primary or replica. Symptom: checkout latency spikes when morning reports run.
- Partitioning by a high-cardinality column. Symptom: millions of kilobyte files; planning takes longer than the query.
- No compaction or snapshot expiration. Symptom: queries slow down week by week while data volume is flat.
- Logical deletes treated as erasure. Symptom: an auditor restores an old snapshot or reads bronze and finds the national ID.
- Raw PII in silver and gold. Symptom: every erasure request becomes a project.
- Raw-table CDC as a cross-team contract. Symptom: a column rename in the order service breaks the finance mart overnight.
- Upgrading a table to v3 before every engine supports it. Symptom: an older job can no longer read or write the table.
Interview angle
- How it shows up: "Design the data platform for a digital bank", "Warehouse or lakehouse?", "How do you delete a customer from the lake?", "Our Spark jobs got slow — where do you look?"
- A strong answer covers: CDC without touching OLTP, Kafka, a table format with a named catalog, medallion layers with owners, engines per workload, contracts, quality checks, lineage, tokenization and masking, erasure with expiration, residency, file layout and a cost model.
- Follow-ups: How do concurrent writers avoid corrupting a table? How do you reproduce last quarter's report? How do you backfill gold after a bug? How long until an erased customer is physically gone?
- Red flags: "dump everything into S3", no catalog, deletes assumed physical, PII everywhere, one giant cluster for every workload.
Self-check
1. What does a table format add to Parquet files on object storage, and how is a commit atomic?
It records which data and delete files form each snapshot, with schema and statistics. The writer writes new files and metadata, then the catalog swaps the pointer with compare-and-swap: readers see the old or new snapshot, never a partial write, and a concurrent loser retries.
2. Copy-on-write or merge-on-read for a CDC-fed accounts table, and for a monthly gold mart?
The CDC table takes small updates and deletes all day, so merge-on-read keeps writes cheap and scheduled compaction restores read speed. The gold mart is built in batch and read heavily, so copy-on-write gives the fastest, simplest reads.
3. What must happen before an erased customer is physically gone from an Iceberg table?
The DELETE only writes a deletion vector. Rewrite the files carrying deletes with a targeted rewrite (default thresholds skip files with few deleted rows), expire old snapshots, remove orphans. Tagged snapshots never expire, so never tag PII tables; bronze, Kafka and backups need retention limits or crypto-shredding.
4. What is hidden partitioning, and how does partition evolution help a growing clickstream table?
The table declares a transform such as days(event_time); Iceberg derives partition values and prunes when queries filter on event_time itself. When volume grows, switch new data to hours(event_time) as a metadata change: old files keep their layout, both are pruned, nothing is rewritten.
5. Scenario: a digital bank needs a platform whose data stays in Vietnam and whose reports auditors can reproduce. Outline it.
Debezium CDC into Kafka; Flink or scheduled Spark MERGE into Iceberg bronze/silver/gold on object storage in Vietnam; an Iceberg REST catalog such as Polaris enforcing masking and row policies. Tokenize PII at ingestion, check control totals against the GL with write-audit-publish, emit lineage, and tag the gold snapshot behind each report.
6. Why do streaming ingestion jobs create small files, and how do you fix it without losing freshness?
Each commit writes at least one file per writer per partition touched, so writers × partitions × commits multiply. Use hash distribution, set the commit interval to what the freshness SLA really needs, and compact partitions that no longer receive writes.
Exercise
Build a mini lakehouse with Docker Compose (PostgreSQL, Kafka, Debezium, an S3-compatible store, an Iceberg REST catalog, Spark, Trino):
- Generate inserts, updates and deletes for 100,000 orders in PostgreSQL; stream them with Debezium into
bronze.orders_cdc. - Run the
MERGEabove hourly intosilver.ordersand verifycount(*)andsum(total_minor)match PostgreSQL exactly. - Delete one customer's orders at the source, propagate, then rewrite, expire and clean up; use the
filesandsnapshotsmetadata tables and a bucket listing to prove no file with that customer remains. - Tag a gold table, change the data, and reproduce the tagged numbers with
VERSION AS OF.
Done when: silver matches the source to the row and the dong, the erased customer is provably gone, the tagged report reproduces exactly, and you can explain the file count before and after compaction.
Further reading
- Apache Iceberg Table Spec — format versions, deletion vectors, metadata tree.
- Iceberg Spark procedures — compaction, snapshot expiration, orphan cleanup, fast-forward.
- Delta Lake deletion vectors — logical deletes,
REORG … PURGEandVACUUM. - Principles for effective risk data aggregation and risk reporting (BCBS 239) — Basel Committee, 2013.
- OpenLineage documentation — lineage event model and integrations.
- Martin Kleppmann, Designing Data-Intensive Applications — Ch. 3 (column storage), Ch. 10–11.
- Joe Reis & Matt Housley, Fundamentals of Data Engineering (O'Reilly).
- Zhamak Dehghani, Data Mesh (O'Reilly).
- Armbrust et al., "Lakehouse: A New Generation of Open Platforms that Unify Data Warehousing and Advanced Analytics" (CIDR 2021).
Related
- Batch & Stream Processing — processing models on top of this platform.
- Message Queues & Event Streaming — the Kafka backbone.
- Transactional Outbox & CDC — Debezium, replication slots, contracts.
- Storage Engines: B-Tree vs LSM — the OLTP side.
- Partitioning & Sharding in Practice — time partitions and retention at the source.
- Real-time Fraud Detection Pipeline — feature store and training/serving skew.
- Compliance: PCI DSS, KYC/AML, Data Protection — legal side of PII, retention, residency.
- Reconciliation & Settlement — the domain behind reconciliation analytics.
- Flash Sale System — events behind sale-day dashboards.
- Capacity Planning & Cost — sizing and cost models.
- DevOps, CI/CD & Platform Engineering — running the platform's infrastructure.
Do the self-check first. Marking it complete schedules spaced reviews (1, 3, 7, 14, 30… days).