Documentation
MeterStore stores metering readings in PostgreSQL and Apache Iceberg and queries them through one SQL interface.
Getting started walks through deployment. Architecture explains the tier boundary. For settlement reruns or SQL clients outside Rust, see Reproducibility and External engines.
Pages
- Getting started Requirements, installation, and a store over both tiers in about thirty lines of Rust.
- Architecture The tiering watermark, why the two tiers are disjoint by construction, how archival stays crash-safe, and what the design deliberately does not do.
- Storage model The physical columns, the merge key that decides which reading supersedes which, identity versus attribute columns, and the constraints that stop a write producing a wrong number.
- Writing readings Routed writes, the bulk path for steady-state ingest, idempotent redelivery, and knowing what a write displaced.
- Querying SQL across both tiers, results that carry the boundary they were computed against, the typed series API, and the calendar functions that make daily sums correct.
- Reproducibility Reproducing a past settlement: pinned Iceberg snapshots with an enforced version ceiling, and the transaction-time axis that covers the hot window too.
- Completeness A missing interval is information, not an empty set. DST-aware gap detection as a first-class query.
- Operations Scheduling archival, the system tables an operator opens during an incident, metrics worth alerting on, schema evolution, and the failure matrix.
- The CLI meterstore init, check, create, status, archive, maintain, reassert-watermark, query, completeness, audit and serve — the same library, without a program to write.
- External engines Reading the history from Spark, Trino, DuckDB or PyIceberg with MeterStore out of the data path — and the version-resolution trap that silently double-counts if you skip one step.
- Privacy and retention Why 15-minute consumption is personal data, why § 60 Abs. 6 MsbG is a deletion duty rather than a retention mandate, and how pseudonymisation satisfies it over an append-only lake.
- Configuration The builder is the API and TOML is a front end over the same validated types, so a file and a hand-built configuration pass through identical checks.