SRV-03 · ANALYTICS ENGINEERING
Modeling, tests, and docs as code
Analytics engineering is an engineering discipline. Everything versioned, reviewed, tested.
APPROACH
Approach
We operate on the modern stack: dbt for transformations, an orchestrator (Airflow or Dagster), tests in CI, and a metric glossary treated as living documentation. Every pull request ships a preview and an impact plan.
Clear layers: staging isolates sources, intermediate builds reusable blocks, marts ship models ready for BI and reverse-ETL.
Mandatory code review. No model grows without owner and tests.
Docs generated from the code, not written aside: if the model changes, the doc changes.
TESTS · DOCS
Tests & docs
- T-01Schema tests (unique, not_null, relationships) on every critical table
- T-02Contract tests on marts: breaking changes fail CI
- T-03Freshness tests per table SLA
- T-04Docs generated via dbt-docs with full lineage
- T-05Exposure tracking: every dashboard linked to its source model
EXAMPLE · MART
How a mart actually looks
A typical revenue mart with an enforced contract, a 2-day late-arrival window, and an incremental key. Every PR runs the contract test; a breaking change fails CI.
fct_revenue.sqlSQL