All projects

The transformation
layer, tested

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.

Raw records are staged into typed sources, composed into intermediate models and resolved into presentation marts, with expectations asserted at every layer and the lineage recorded. 01 Raw as it arrived 02 Staging typed and cleaned 03 Intermediate business logic 04 Marts one agreed answer
Raw records are staged into typed sources, composed into intermediate models and resolved into presentation marts, with expectations asserted at every layer and the lineage recorded. 01 Raw as it arrived 02 Staging typed and cleaned 03 Intermediate business logic 04 Marts one agreed answer
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