dbt data modeling best practices following Kimball/dimensional modeling. Use when writing or reviewing dbt models, adding tests, choosing materializations, or following SQL/YAML/Jinja style conventions. Covers architecture layers, naming conventions, testing strategy, SQL style, and BigQuery optimization.
Approach: Kimball / dimensional modeling (star schema).
Read Architecture to determine:
.sql and .yml filesRead these three references, then create the files:
| Model prefix | Layer file |
|---|---|
seed_, raw_ | Raw |
snp_, stg_ | Staging |
int_ | Intermediate |
dim_, fct_, brg_, mart_, agg_, rpt_, util_ | Datamart |
Identify the layer from the model's prefix, then read: