QuestionQ57

Verified

Consider the following SQL and YAML files for the model model_a:

models/staging/model_a.sql

\{\{ config( materialized = "view") \}\}  
with customers as (  
...  
)  

dbt_project.yml

models:  
  my_new_project:  
    +materialized: table  
    staging:  
      +materialized: ephemeral  

Which statement is true about model_a? Choose 1 option.

Explanation

The config() block in model_a.sql sets the model's materialization to view, overriding the project-level settings. A view evaluates its underlying data when queried and can be slower to query than a stored table, especially for complex transformations. Its results are only as fresh as its underlying relations, so end-to-end freshness is not guaranteed. (docs.getdbt.com)

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!