Analytics engineering · 2026
dbt E-Commerce Analytics Mart
A tested dbt project turning the real Olist e-commerce dataset into a single source of truth for revenue, customers, and product performance.
- models, staging → marts
- 14
- revenue definition everywhere
- 1
- real Olist data — no synthetic
- 100%
Architecture
Select a stage to explore it.
01 · Raw sources
The real Brazilian e-commerce dataset from Olist — orders, items, payments, products, customers — loaded as raw sources with dbt source definitions and freshness context.
Visuals

01 · Problem
Every team that computes revenue slightly differently eventually has three dashboards with three answers. The point of an analytics mart is one tested definition of the business — this project builds that for a real e-commerce dataset.
02 · Solution
A dbt project with a disciplined staging → intermediate → marts flow: 14 models, a single revenue macro used everywhere, explicit fact grains, and consumer marts for core, customer, and finance questions — tested end-to-end against real data in CI.
03 · Engineering decisions
Revenue lives in one macro, not in every model that needs it — change it once, every mart agrees. Singular tests encode business invariants (customer spend must reconcile across marts; revenue is never negative) rather than just column-level checks. And the whole project runs against the real Olist data in CI, because models that only pass on toy data haven't been tested.
04 · Results
A warehouse where the order-line fact, the customer dimension, and the monthly revenue series all provably agree — with lineage from raw source to Power BI exposure, and CI that would catch a definition drifting.
05 · Lessons learned
Analytics engineering is API design for data: the grain, the definitions, and the tests are the contract. dbt's real value isn't SQL templating — it's making that contract enforceable.