Complete the code to define a model with a proper naming convention prefix.
models: - name: [1]_sales_data description: "Model for sales data"
The prefix stg stands for staging, which is a common naming convention for cleaned raw data models.
Complete the code to set a naming convention for incremental models.
models:
- name: [1]_customer_updates
config:
materialized: incrementalThe prefix int is commonly used for intermediate or incremental models in dbt naming conventions.
Fix the error in the naming convention for a temporary model.
models:
- name: [1]_temp_results
config:
materialized: tableThe prefix tmp is used for temporary models, which are often materialized as tables for intermediate processing.
Fill both blanks to create a dictionary comprehension that maps model names to their prefixes based on naming conventions.
model_prefixes = {model: [1] for model in models if model.startswith([2])}The code extracts the prefix from the model name by splitting at the underscore and filters models starting with 'stg_'.
Fill all three blanks to create a dictionary comprehension that maps model names to their suffixes if they end with '_data' and have a 'raw' prefix.
filtered_models = {model: model[1] for model in models if model.startswith([2]) and model.endswith([3])}The code extracts the suffix after the prefix by slicing from index 4 onward, filters models starting with 'raw_' and ending with '_data'.