Bird
0
0

Which of the following is the correct YAML syntax to set the materialized property to view for all models in a project named sales_project?

easy📝 Syntax Q3 of 15
dbt - Project Organization
Which of the following is the correct YAML syntax to set the materialized property to view for all models in a project named sales_project?
Amodels: sales_project: materialized = view
Bmodels: sales_project: materialized: view
Cmodels: sales_project: materialized: - view
Dmodels: sales_project: +materialized: view
Step-by-Step Solution
Solution:
  1. Step 1: Recall dbt YAML syntax for configurations

    In dbt_project.yml, configuration keys like materialized must be prefixed with + (e.g., +materialized: view) to distinguish them from directory names.
  2. Step 2: Check each option

    models: sales_project: +materialized: view uses correct +materialized: view. models: sales_project: materialized: view lacks +, treating materialized as directory. models: sales_project: materialized: - view uses list incorrectly. models: sales_project: materialized = view uses = invalid in YAML.
  3. Final Answer:

    models: sales_project: +materialized: view -> Option D
  4. Quick Check:

    dbt configs require + prefix [OK]
Quick Trick: YAML uses colon and indentation, no equal signs [OK]
Common Mistakes:
MISTAKES
  • Using equal signs instead of colons
  • Adding plus signs incorrectly
  • Using lists for single values

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes