Bird
0
0

Which of the following is the correct syntax to access the current target schema in a dbt Jinja template?

easy📝 Syntax Q3 of 15
dbt - Jinja in dbt
Which of the following is the correct syntax to access the current target schema in a dbt Jinja template?
A{{ invocation_id.schema }}
B{{ this.schema }}
C{{ target.schema }}
D{{ run_started_at.schema }}
Step-by-Step Solution
Solution:
  1. Step 1: Recall the target variable structure

    target is a dictionary with keys like schema and database.
  2. Step 2: Confirm correct syntax

    Accessing the schema is done by {{ target.schema }}. Other options misuse variables or properties.
  3. Final Answer:

    {{ target.schema }} -> Option C
  4. Quick Check:

    Access target schema = {{ target.schema }} [OK]
Quick Trick: Use dot notation on target for schema or database [OK]
Common Mistakes:
MISTAKES
  • Trying to access schema on this or invocation_id
  • Using incorrect variable names
  • Forgetting double curly braces

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes