Skip to content

feat(services): write capture data to iceberg tables - #132

Merged
TheMeinerLP merged 4 commits into
mainfrom
feat/ingest-iceberg-writer
Nov 18, 2026
Merged

TheMeinerLP merged 4 commits into
mainfrom
feat/ingest-iceberg-writer

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Summary

Capture data can now land in Apache Iceberg tables instead of Parquet files. Today every flushed batch of frames becomes a Parquet file plus a catalog row, which makes later changes (erasing a player, expiring old data, pinning a dataset to a fixed state) file surgery. Iceberg gives those operations a table-level answer. This PR adds the write path only, behind a setting.

  • The default stays Parquet. Nothing changes for a deployment that does not opt in.
  • With CORVUS_LAKE_FORMAT=iceberg, ingest appends each flush to the events and raw tables of the Polaris catalog. The tables are created on start-up if they are missing.
  • A message is still acknowledged only after its data is durable. In Iceberg mode durable means the append committed; a failed append is redelivered as before.
  • When two replicas commit to the same table at once, the loser reloads the table and retries a few times with a short randomised wait.
  • Session membership is no longer kept in the catalog for Iceberg data. Readers filter the tables instead.

Not in this PR

  • Backfill of the existing Parquet files.
  • Erasure of Iceberg rows. Until that step lands, a completed erasure request covers the Parquet files only.
  • Retention of raw in Iceberg. Expiry still works on the Parquet files only.
  • Pinning dataset snapshots to Iceberg snapshot ids.

Layout, settings and the open points are in docs/reference/data-lake.md section 2a.

Testing

  • Unit tests run the Iceberg writer against a local SQL catalog: table bootstrap, partitioning by date, retry on commit conflicts, no retry on other errors, ack only after commit, nak on failure.
  • Helm unit tests cover the default format and the rendered Iceberg settings.
  • Not run here: a deployment against the real Polaris catalog. That is the next check after merge, on a non-production replica.

The ingest pipeline hands each flushed buffer to a LakeSink and acks
only after its commit. The Parquet staging, copy and catalog
registration move unchanged into ParquetSink; no behaviour change.
CORVUS_LAKE_FORMAT=iceberg makes ingest append the frames to the
events and raw tables of the Polaris REST catalog instead of writing
Parquet files. Parquet stays the default.

The tables are created at start-up if missing, partitioned by date.
A message is acked only after its append committed; commit conflicts
are retried with a fresh table load. No lake_files rows are written
in Iceberg mode. Layout and settings: docs/reference/data-lake.md
section 2a.
Adds a lake block to values: format (default parquet), catalog URI,
warehouse, namespace, OAuth token URL, scope and client id, and
existing Secrets for the client secret and the S3 keys. With format
iceberg the ingest Deployment gets the CORVUS_LAKE_* settings; a
missing value fails the render.
@TheMeinerLP
TheMeinerLP force-pushed the feat/ingest-iceberg-writer branch from 42f5d90 to ba6e1fc Compare November 18, 2026 13:49
@TheMeinerLP
TheMeinerLP merged commit 015056d into main Nov 18, 2026
13 checks passed
@TheMeinerLP
TheMeinerLP deleted the feat/ingest-iceberg-writer branch November 18, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant