0
0
dbtdata~20 mins

dbt_project.yml configuration - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
dbt Project Configuration Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding the purpose of dbt_project.yml

What is the main purpose of the dbt_project.yml file in a dbt project?

AIt contains SQL queries to transform data in the warehouse.
BIt stores the raw data extracted from the source databases.
CIt defines the project configuration including model paths, version, and materializations.
DIt manages user permissions and access control for the dbt project.
Attempts:
2 left
💡 Hint

Think about where dbt stores project-wide settings.

Predict Output
intermediate
1:30remaining
Output of model materialization setting

Given this snippet from dbt_project.yml:

models:
  my_project:
    +materialized: view
    staging:
      +materialized: table

What materialization will the model staging.orders use?

Aincremental
Bview
Cephemeral
Dtable
Attempts:
2 left
💡 Hint

Check if there is a more specific setting for staging models.

data_output
advanced
2:00remaining
Effect of source-paths configuration

Consider this dbt_project.yml snippet:

source-paths:
  - models
  - analysis

If you add a new SQL model file under analysis/, will dbt compile it as a model?

ANo, because <code>analysis</code> files are not compiled as models by default.
BYes, because <code>analysis</code> is included in <code>source-paths</code>.
CYes, but only if the file has a specific naming convention.
DNo, because <code>source-paths</code> only applies to data sources, not models.
Attempts:
2 left
💡 Hint

Think about the difference between models and analysis directories in dbt.

🔧 Debug
advanced
2:00remaining
Identify the error in dbt_project.yml snippet

What error will occur with this dbt_project.yml snippet?

models:
  my_project:
    +materialized: table
    +schema: analytics
    staging:
      +materialized: incremental
      +schema: staging_data
AYAML parsing error due to incorrect indentation.
BNo error; configuration is valid.
CRuntime error because <code>+schema</code> cannot be set at folder level.
DError because <code>+materialized</code> cannot be incremental.
Attempts:
2 left
💡 Hint

Check YAML indentation and valid dbt config keys.

🚀 Application
expert
2:30remaining
Predict the schema for nested model configurations

Given this dbt_project.yml snippet:

models:
  my_project:
    +schema: analytics
    marts:
      +schema: marts_schema
      finance:
        +schema: finance_schema
        +materialized: table

What schema will the model marts.finance.revenue use?

Afinance_schema
Banalytics
Cdefault schema of the warehouse
Dmarts_schema
Attempts:
2 left
💡 Hint

Remember that nested configurations override parent settings.