Ogni modello testato, fonti documentate, un responsabile per mart.
Constitution — dbt analytics warehouse
Version 1.0.0 · Ratified 2026-11-10
These principles hold for every spec, plan and task of the warehouse. A spec may add rules; it never weakens these.
-
Every model tested. Every model has at least
uniqueandnot_nulltests on its primary key, plusrelationshipsandaccepted_valueswhere they apply.dbt buildruns the tests in CI, and a failing test blocks the merge. -
Sources documented. Every raw table is declared in a
sources.ymlwith a description, its owner and afreshnesscheck. Models read raw data only throughsource(), never by a hard-coded table name. -
One owner per mart. Each mart has one named owner in its
meta, and every dashboard or tool that reads it is declared as anexposure. A change to a mart with exposures is reviewed by its owner. -
Layers flow one way. Models go from staging (one per source table, renamed and typed) to intermediate to marts. A mart never reads a source directly and a staging model never joins, so lineage in the DAG stays readable.
-
Contracts on public models. Marts read by other teams have
contract: enforcedwith declared column types, and a breaking change ships as a new modelversion. The old version keeps working until its consumers have moved. -
Incremental models are safe to rerun. Incremental models declare a
unique_keyand a lookback window, so rerunning a day gives the same result. A full refresh and an incremental run produce the same rows in the CI comparison.