Bird
0
0

You want to configure dbt_project.yml so that all models in the core folder are materialized as tables, except those in core.temp which should be views. How should you write this?

hard📝 Application Q8 of 15
dbt - Project Organization
You want to configure dbt_project.yml so that all models in the core folder are materialized as tables, except those in core.temp which should be views. How should you write this?
Amodels: my_project: core: +materialized: view core.temp: +materialized: table
Bmodels: my_project: core: +materialized: table temp: +materialized: view
Cmodels: my_project: core.temp: +materialized: view core: +materialized: table
Dmodels: my_project: core: materialized: table core.temp: materialized: view
Step-by-Step Solution
Solution:
  1. Step 1: Set default materialization for 'core' folder

    Use core: with +materialized: table to set tables for all models in core.
  2. Step 2: Override materialization for 'core.temp'

    Inside core:, nest temp: with +materialized: view to override for that subfolder.
  3. Final Answer:

    models: my_project: core: +materialized: table temp: +materialized: view -> Option B
  4. Quick Check:

    Nested folder overrides override parent settings [OK]
Quick Trick: Nest subfolder config inside parent folder in YAML [OK]
Common Mistakes:
MISTAKES
  • Placing subfolder config at same level as parent
  • Using wrong indentation
  • Not using '+' for config overrides

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes