Problem
Monzo's data warehouse has grown with the bank. Most data arrives as analytics events from more than 3000 microservices, and the warehouse ingests more than 3 billion events on an average day. Rebuilding every dbt model on each run delays landing times and raises BigQuery costs. Incremental models fix this, but they are harder to write and add new failure modes.
Example from the article: a base model for a new event source is generated with one command, so it is incremental from the first day.
Solution in brief
Monzo makes most models incremental, so each run transforms only new data. Generated code, custom materialisations and cost reporting keep the effort low. Correctness rests on blue-green comparison against the non-incremental version, scheduled full refreshes against drift, and an automatic fallback to a full refresh when a run would fail.
Questions this case answers
- How to keep a scheduled transformation pipeline fast and cheap as event volume grows, when rebuilding every table from scratch is too slow and costly
- How to verify that an incremental rebuild matches the full rebuild and how to correct drift caused by late-arriving or out-of-order records
- How to keep a dbt warehouse fast and cheap when it ingests billions of events per day
- How to check that an incremental model gives the same results as its full-rebuild version before switching
Tools and methods
- dbt incremental materialisation — transform only new data on each run, with a full refresh on the first build or on demand
- Custom materialisations — generate incremental type 2 slowly-changing-dimension style models from short config
- Lookback window — re-read a buffer of past time to catch late events
- Blue-green deployment with reconciliation scripts — run both versions in parallel and compare results
- Scheduled and automatic full refreshes — correct drift and avoid type-clash failures
- Looker reporting on build metadata — find the costliest and slowest models
Google or a one-time email code. No password.