Zum Hauptinhalt springen

Use source() For Raw Data Boundaries

Describe how dbt sources make raw data lineage, tests, and freshness visible.

dbt-basics5 min read

The first trustworthy dbt node is usually not a model; it is the source declaration. The mechanism source() names raw tables as external inputs to your DAG. That gives dbt enough information to show lineage, run source-scoped tests, and calculate freshness where configured. It also creates an ownership boundary: upstream loaders own extraction, while the dbt project owns transformation assumptions. What changes in practice Hard-coded raw.stripe.payments can produce correct SQL, but dbt cannot reason about it as a dependency. {{ source("stripe", "payments") }} makes the dependency explicit and gives the project a place to document grain, loaded-at fields, accepted values,…

Read the full lesson

Sign up free: one personalized lesson every day, matched to your role and goals.

← Back to library

Kontakt aufnehmen