Bird
0
0

Which of the following is the correct syntax to reference a model named finance.revenue in dbt?

easy📝 Syntax Q3 of 15
dbt - Governance and Collaboration
Which of the following is the correct syntax to reference a model named finance.revenue in dbt?
A<code>ref('finance.revenue')</code>
B<code>ref(finance.revenue)</code>
C<code>ref('revenue')</code>
D<code>ref('finance_revenue')</code>
Step-by-Step Solution
Solution:
  1. Step 1: Understand the ref() syntax

    The ref() function takes a string with the full model name including schema if needed.
  2. Step 2: Match the exact model name

    The model is named finance.revenue, so it must be passed as a string exactly.
  3. Final Answer:

    ref('finance.revenue') -> Option A
  4. Quick Check:

    Correct ref syntax = ref('model_name') [OK]
Quick Trick: Always pass model name as a string in ref() [OK]
Common Mistakes:
MISTAKES
  • Omitting quotes around model name
  • Using incorrect model name string
  • Using underscores instead of dots

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes