Model anatomy
Every model starts with aMODEL() header followed by its query:
References
SQLBuild discovers the dependency graph from these calls and orders selected work topologically. Among selected models, upstream models run before downstream dependents. An unselected upstream is read from its existing warehouse relation; use an upstream-expanding selector such as
+fact_orders when it should also be built. Seeds use __seed(), not __ref().
See Functions for scalar UDF and table-function references.
Model guide
- Materializations: views, tables, incrementals, snapshots, and custom materializations.
- Schemas: inline columns, reusable schemas, inheritance, audits, and model-local extensions.
- Type Enforcement: static type checks and runtime cast behavior by materialization.
- Contracts: exact and open output validation, runtime guarantees, nullability, and enum-backed columns.
- Hooks: SQL and Python lifecycle hooks.
- Configuration:
MODEL()field reference and SQL-validation controls.

