QuestionQ25

Verified

You are creating a fct_tasks model with the following CTE:

with tasks as (  
select * from \{\{ ref('stg_tasks') \}\}  
)  

You receive the following compilation error in dbt:

Compilation Error in model fct_tasks (models/marts/fct_tasks.sql)  
Model 'model.dbt_project.fct_tasks' (models/marts/fct_tasks.sql) depends on a node named 'stg_tasks' which was not found  

Which statement is correct? Choose 1 option.

Explanation

ref('stg_tasks') must resolve to an available dbt resource. The error means dbt could not find that dependency in the project context; a missing or misnamed model is the best match among the choices. An ephemeral model can be referenced without existing as a warehouse relation. (docs.getdbt.com)

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!