Business logic that lives inside one-off queries cannot be tested, versioned or traced. Modelling it as a layered graph turns analytics from a set of opinions into a build with a pass or fail result.
System
Passenger profiling platform
Scale
Layered model graph, refreshed nightly
Role
Sole architect and engineer
Stack
dbt / Dagster / DuckDB
01
The challenge
Once the data lived somewhere queryable, the question stopped being where it is and became whose definition of the metric is the right one.
02
The approach
Model the logic as a layered graph with declared expectations and a recorded lineage, refreshed on a schedule like any other build.
03
The result
One authoritative definition per metric, tracing a number to its source is a lookup rather than an investigation, and regressions surface at build time.
Fig. 05 — Every number on a dashboard can be traced back to a raw record
Hover any step to read what it doesTap any step to read what it does