Skip to content

Tracing and confirming a model's upstream raw sources

Raw object dependencies are references to source tables/views in the underlying data platform (not other dbt models) that a dbt project relies on. Before building or optimizing models, analytics engineers must identify these upstream raw dependencies and verify they exist, are accessible, and are correctly declared so the DAG builds accurately and lineage stays trustworthy.

1 · Learn the must-know

  • Raw dependencies should be declared using source() functions in models, pointing to tables/views defined in a sources.yml file rather than hardcoded schema.table references.
  • Running dbt source freshness checks whether raw source tables are being loaded on the expected schedule, helping surface stale or broken upstream dependencies.
  • The dbt docs generate command combined with dbt docs serve lets you inspect the DAG and confirm which raw sources feed into which models, making it easier to spot missing or unused dependencies.
  • Using source() instead of direct table references ensures raw dependencies appear correctly in the DAG and enables features like source freshness and lineage graphs.
  • A model that references a raw table directly (e.g., via a raw SQL FROM clause) bypasses dbt's dependency tracking, which can break run order and make impact analysis unreliable.
  • The dbt list (or ls) command with selectors like source:* can be used to verify which sources exist in the project and confirm they are referenced as expected before development or refactoring begins.

2 · Check your understanding

Check this objectiveFree · always available

A model's compiled SQL contains the following FROM clause, written directly against the raw table instead of using the source() function: select * from "analytics_raw"."stripe"."payments" The payments table is already correctly declared under a stripe source block in sources.yml. What is the practical consequence of referencing the raw table this way instead of with source('stripe', 'payments')?

Your objective map0 tried · 0 answered correctly · 31 untouched

What you have tried across dbt Analytics Engineering's objectives, not a readiness score.

Developing and optimizing dbt models45.16% of the exam*0 of 14 tried
Managing dbt models governance9.68% of the exam*0 of 3 tried
Debugging data modeling errors16.13% of the exam*0 of 5 tried
Troubleshooting and optimizing dbt pipelines6.45% of the exam*0 of 2 tried
Implementing dbt tests9.68% of the exam*0 of 3 tried
Implementing and maintaining external dependencies6.45% of the exam*0 of 2 tried
Leveraging the dbt state6.45% of the exam*0 of 2 tried

* Our estimate. dbt Labs publishes no section weights.

3 · Keep going