← Alle Vorlagen

Jedes Modell getestet, Quellen dokumentiert, ein Verantwortlicher pro 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.

  1. Every model tested. Every model has at least unique and not_null tests on its primary key, plus relationships and accepted_values where they apply. dbt build runs the tests in CI, and a failing test blocks the merge.

  2. Sources documented. Every raw table is declared in a sources.yml with a description, its owner and a freshness check. Models read raw data only through source(), never by a hard-coded table name.

  3. One owner per mart. Each mart has one named owner in its meta, and every dashboard or tool that reads it is declared as an exposure. A change to a mart with exposures is reviewed by its owner.

  4. 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.

  5. Contracts on public models. Marts read by other teams have contract: enforced with declared column types, and a breaking change ships as a new model version. The old version keeps working until its consumers have moved.

  6. Incremental models are safe to rerun. Incremental models declare a unique_key and 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.