Sources declare external data that your models depend on. They are defined in YAML files underDocumentation Index
Fetch the complete documentation index at: https://docs.sqlbuild.com/llms.txt
Use this file to discover all available pages before exploring further.
sources/ in your project directory.
Table sources
Point at an existing table or view in your warehouse:__source("raw_events").
Expression sources
Define source data inline as a SQL expression. No external tables or setup scripts needed:Source audits
Sources support the same audit system as models. Audits attached to sources run before any dependent model is built:error severity fails, all downstream models that depend on that source are blocked.
Config reference
| Field | Description |
|---|---|
name | Source name, used in __source("name") references |
database | Target database (optional) |
schema | Target schema (optional) |
table | Target table name (defaults to name if omitted) |
expression | Inline SQL expression (alternative to table reference) |
description | Human-readable description |
type_enforcement | Enable type casting based on declared column types |
columns | Column declarations with optional types and audits |
audits | Source-level audits |

