Repository navigation
Releases
v0.4.0: data modelling, governance and SOC 2 readiness
Data modelling and governance at the depth an architecture is judged at, with two new measurements behind them.
Data model (6)
- Four domains with their owners, sources and data products.
- A logical model and glossary whose metric definitions match the assistant's semantic layer.
- Layers from raw to serving, each with its retention and where personal data may appear.
- A Type 2 policy per attribute.
- Physical design per engine: the lakehouse marts, the stage-2 ClickHouse store, and Citus as the product database's growth path.
- Modelling standards, including schema evolution.
Decisions
- 0016: Kimball marts over a raw change history, without a Data Vault layer.
- 0017: personal data lives in one identity table per source. Measured on UniForm, erasing one person rewrote 31,849,449 event rows when the e-mail was copied into every row, and 59,999 when it lived in one table. CI now fails if a published table carries a personal column.
- 0018: the platform is inside the SOC 2 system description under Security, Availability and Confidentiality, with the vendors carved out.
Governance (7)
- An operating model with a responsibility matrix.
- Handling rules per classification, and an access lifecycle with time-boxed grants.
- A retention schedule and data-quality management.
- Policy as code.
- The access audit: one query over the catalog's tags and the platform's column lineage found every read of all 5 personal columns in 90 days, in 4.7 s.
SOC 2 readiness (12): scope, a timeline aligned with the roadmap, a 21-control matrix with the evidence each control produces and how it's collected, and what an auditor asks.
Quality attributes (13): every attribute with its requirement, design, measured figure and gap, plus disaster-recovery targets by component and failure.
v0.3.0: the Databricks proof of concept, measured
The Databricks half of the proof of concept is complete, the current state is re-measured at the client's own rate, and the cost model is priced in the client's EU region. A review of v0.2.0 drove most of the changes.
Current state, re-measured at the brief's peak rate (12 product requests a second; v0.2.0 ran at 100, about 25 times the brief's event rate)
- Reports on the primary took the product's p95 request latency from 40 to 525 ms.
- On the default replica, 3 of 35 long report runs finished; with
hot_standby_feedback, 11 of 11, holding back the primary's cleanup. - New stopgap, measured: a replica for reports alone with
max_standby_streaming_delayat 15 minutes finished 7 of 7, up to 4.7 minutes behind (0001).
Proof of concept, Databricks half (11)
- Speed: the slowest BI report's median was 2.82 s on the smallest warehouse with eight analysts at once, against 62 s on the product's Postgres; nothing queued.
- Cost: one day's build and reports took 38 s and were billed 0.743 DBU, 11 minutes 9 seconds awake, 95% of it the auto-stop wait. Hours awake set the bill: $21 to $961 a month at EU list price.
- Operability: Terraform (OpenTofu 1.13, Databricks provider 1.138) owned 6 of 7 kinds of governance object and planned clean; the mask function needs SQL.
- Erasure on UniForm, the chosen format: deletion vectors are refused, so a delete rewrote all 8 files holding the user's rows; same 15-day timeline.
Design
- Cost model in AWS EU (Ireland) at the editions the requirements need. Snowflake Standard and BigQuery are dropped; Business Critical is added for PrivateLink.
- CDC rules: what each table's deletes mean, a column list excluding
last_seen_at, and the restartrds.logical_replicationneeds. - A backfill of the S3 exports so Q4 holds at stage 1.
- A 14-day backup in a separate AWS account; landed files expire after 30 days; erasure within 15 days with a daily VACUUM.
- One roadmap in weeks, with an honest one-month slip of the assistant.
Evidence
- In-repo figures are re-derived from the results files by
scripts/build.py --check. - Evidence that does not test its decision directly is labelled indirect.
v0.2.0 — an architecture engagement for one client
The repository is now an architecture engagement for one fictional client: a B2B SaaS company running its analytics on the product's Postgres.
- Brief and measured current state.
baseline/builds a lab copy of the client's database (Postgres 17 primary and replica, 31.5 million events) and measures four scenarios. With reports on the primary, the product's p95 went from 93 ms to 794 ms; on the read replica, 3 of 412 long report runs finished. - Requirements as 15 testable quality scenarios; five options scored against them, with cost including the people to run each.
- A staged target architecture with C4 views, zones, deployment and failure modes; a data model with a bus matrix and three Open Data Contract Standard contracts, linted in CI, where a renamed column must be reported as breaking.
- Security and governance with SOC 2 and GDPR controls, migration waves with a parallel run and rollback, operations, a roadmap and a risk register.
- 15 decision records in one template (drivers, options, consequences, revisit conditions, generated evidence): 11 Accepted, 4 Proposed until the Databricks-or-Snowflake proof of concept or their stage.
The generic reference architecture of v0.1.0 remains in that tag.
v0.1.0 — a reference data platform architecture
Thirteen platform decision records, twelve backed by results measured in the public labs (every figure generated from evidence/evidence.yml and checked in CI), with context and workload tiers, architecture views and failure modes, quality targets, governance, operations runbooks, and a platform selection guide with a cost model built from list prices retrieved 2026-10-18.
Write-up: https://basantbhattarai.com.np/writing/warehouse-bill-per-scan-or-per-hour/