In dbt projects, why is it important to use consistent naming conventions for models, sources, and tests?
Think about how naming helps humans and teams working together.
Consistent naming conventions improve readability and maintainability, making it easier for teams to collaborate and understand the project structure.
Given the naming convention stg_ prefix for staging models and int_ for intermediate models, which of the following is a correctly named intermediate model?
Look for the prefix that matches intermediate models.
Intermediate models use the int_ prefix, so int_customer_orders is correct.
Consider this dbt model naming snippet using Jinja variables:
{% set prefix = 'stg' %}
select * from {{ prefix }}_sales_dataWhat is the resulting table name when compiled?
Jinja variables are replaced during compilation.
The variable prefix is set to stg, so the compiled name is stg_sales_data.
Which of the following model names will cause a dbt compilation error due to invalid naming conventions?
Check for characters not allowed in dbt model names.
Model names cannot contain hyphens; customer-data is invalid and causes compilation errors.
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?
Count models with correct prefixes only.
Models with prefixes stg_, int_, and raw_ follow conventions. orders_final does not have a prefix, so 5 models follow conventions.