Files
0pt/docs/10-lakehouse-decision.md
T
adminandClaude Sonnet 5 2545218265 Document lakehouse write-path ownership decision (ADR-0030)
Points at n0d's ADR-0030 (Apache Iceberg canonical, Delta rejected for
P0/P1) and lays out 0pt's write-path plan: dataset-to-Iceberg-table
mapping, writes through ST0RE's future table registry, keeping QA and
source-rate/crawl-compliance logic in 0pt. Schema/event names specified
precisely for a future implementation session. Written adjacent to, not
touching, the substantial live P0 data-platform build in progress in this
repo (data-contract/dataset/quality-check services).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-11 15:11:15 +02:00

3.4 KiB

10 · Lakehouse decision (pointer)

This doc is a pointer, not a new architecture. It records an ecosystem-wide decision made outside this repo and states what it means for 0pt specifically. It does not change anything in docs/02-architecture.md or docs/03-data-model.md today — Postgres remains the backbone for 0pt's platform tables and current data entities (docs/03). Read this alongside those docs, not instead of them.

The decision (made elsewhere — do not re-litigate here)

Apache Iceberg is the canonical SIAX lakehouse table format, per ADR-0030, authored in the n0d (Compute OS) repo. Delta Lake is explicitly rejected as the canonical P0/P1 format across SIAX Technology; it may only ever be used later as an import/export bridge, never as the format 0pt writes natively.

Rationale (from the ecosystem ADR, summarized): SIAX needs one vendor-neutral, multi-engine, catalog-first open table format for the MinIO/ST0RE lakehouse, because several products need to share the same tables — ST0RE owns catalog/metadata, 0pt owns dataset writes, N0D owns query/compaction execution, AUD0 owns lineage, API0 owns docs — and because future reads must work from many engines (Trino/Spark/Flink/DuckDB/etc.), not one.

Cross-product ownership split (context, not 0pt's to change)

Product Owns
ST0RE Table/catalog/artifact metadata (the Iceberg catalog + table registry)
0pt Dataset production and writes into Iceberg tables, through ST0RE's table registry
N0D Query/compaction/maintenance execution only
AUD0 Lineage
CL0UD Policy

What this means for 0pt

0pt is the write-path owner for the datasets it produces: 0pt runs sourcing → extraction → structuring → enrichment → QA (docs/06-data-engine.md) as it does today, and — once ST0RE's table registry exists — writes the resulting datasets as Iceberg tables through that registry. 0pt does not talk to N0D's catalog or any lakehouse storage directly; it goes through ST0RE.

This does not replace Postgres as the platform backbone (orders, users, jobs, billing — docs/03 — stay exactly as they are). It is additive: dataset output (the delivered data product, today exported as CSV/Parquet/JSON per docs/04-api.md) gains an additional, canonical Iceberg write-path once ST0RE's registry ships. Concrete to-dos and required schema/event names are in docs/11-lakehouse-write-plan.md.

Also relevant: the sourceRatePolicy deprecation in N0D

The same ecosystem audit that produced ADR-0030 found N0D's ComputePolicy type carrying a sourceRatePolicy field (per-source-domain crawl rate limits, e.g. {'allabolag.se': 1, 'ratsit.se': 1}) hardcoded into N0D's policy defaults. That is 0pt's own crawl-domain knowledge — it has been deprecated/removed from N0D's seed data. 0pt does not rely on N0D for source-rate/crawl-compliance policy; 0pt already owns the sourcing chain and its rate limits today (sources.yaml, docs/06-data-engine.md §rate_limit), and will formalize its own model rather than depend on anything in N0D for this. See docs/11-lakehouse-write-plan.md.

Non-goals of this doc

  • Does not implement Iceberg writes today.
  • Does not modify docs/03-data-model.md's Postgres schema.
  • Does not require ST0RE's table registry to exist yet — this doc is the pointer; the plan doc lists what's blocked on ST0RE vs. what 0pt can define now.