Bird
0
0

You wrote this dbt model SQL:

medium📝 Debug Q6 of 15
dbt - Project Organization
You wrote this dbt model SQL:
select * from source('sales', 'customers')
But it throws an error. What is the likely cause?
AIncorrect source table name.
BMissing double curly braces around the source function.
CUsing ref instead of source.
DMissing semicolon at the end of the query.
Step-by-Step Solution
Solution:
  1. Step 1: Check syntax for source function

    dbt requires {{ source('schema', 'table') }} with double curly braces.
  2. Step 2: Identify error cause

    Missing curly braces causes syntax error, so Missing double curly braces around the source function. is correct.
  3. Final Answer:

    Missing double curly braces around the source function. -> Option B
  4. Quick Check:

    Always use {{ }} for dbt functions [OK]
Quick Trick: Wrap dbt functions in {{ }} to avoid syntax errors [OK]
Common Mistakes:
MISTAKES
  • Forgetting curly braces
  • Assuming table name is wrong without checking
  • Confusing source with ref
  • Thinking semicolon is mandatory

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes