0
0
dbtdata~20 mins

Naming conventions at scale in dbt - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Naming Conventions Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Why use consistent naming conventions in dbt projects?

In dbt projects, why is it important to use consistent naming conventions for models, sources, and tests?

AIt prevents dbt from running models in parallel, ensuring sequential execution.
BIt allows dbt to automatically generate documentation without any manual input.
CIt helps in organizing the project and makes it easier to understand and maintain over time.
DIt reduces the size of the compiled SQL files, improving performance.
Attempts:
2 left
💡 Hint

Think about how naming helps humans and teams working together.

data_output
intermediate
1:00remaining
Identify the correct model name from naming conventions

Given the naming convention stg_ prefix for staging models and int_ for intermediate models, which of the following is a correctly named intermediate model?

Astg_customer_orders
Braw_customer_orders
Ccustomer_orders_stg
Dint_customer_orders
Attempts:
2 left
💡 Hint

Look for the prefix that matches intermediate models.

Predict Output
advanced
1:30remaining
Output of dbt model naming with variables

Consider this dbt model naming snippet using Jinja variables:

{% set prefix = 'stg' %}
select * from {{ prefix }}_sales_data

What is the resulting table name when compiled?

Astg_sales_data
B{{ prefix }}_sales_data
Csales_data
Dstg_sales_data_data
Attempts:
2 left
💡 Hint

Jinja variables are replaced during compilation.

🔧 Debug
advanced
1:30remaining
Identify the naming error causing dbt model failure

Which of the following model names will cause a dbt compilation error due to invalid naming conventions?

Aint_customer_data
Bcustomer-data
Cstg_customer_data
Draw_customer_data
Attempts:
2 left
💡 Hint

Check for characters not allowed in dbt model names.

🚀 Application
expert
2:00remaining
Determine the number of models following naming conventions

You have a dbt project with the following models:

  • stg_orders
  • int_orders_summary
  • raw_orders
  • orders_final
  • stg_customers
  • int_customers_summary

According to the naming convention where stg_ is staging, int_ is intermediate, and raw_ is raw data, how many models follow the naming convention correctly?

A5
B4
C3
D6
Attempts:
2 left
💡 Hint

Count models with correct prefixes only.