DBT-ANALYTICS-ENGINEERING practice question 2 of 35
Select the valid methods for configuring incremental models in dbt. (Select all that apply)
Full set: 409 questionsDomain Testing & documentation
Configuring an incremental model in dbt involves several key steps. First, the model must be explicitly defined as incremental by setting materialized='incremental' in its configuration block (C). The core logic for an incremental run is to process only new or changed data. This is achieved by filtering the source data, typically by adding a WHERE clause to the model's SQL that leverages the isincremental() macro (B). To handle updates to existing records and prevent duplicates, a uniquekey can be specified. This key enables dbt to match records between the source and destination, performing an update/merge operation instead of a simple append (D).
A. partitionby is a data warehouse-specific configuration for performance optimization that physically organizes data. It is not a primary method for defining the incremental logic of which records to process.
1. dbt Labs Documentation
"Incremental models":
Reference for C: Under the "How do I use incremental models?" section
the first step listed is: "To use incremental models
you need to set the materialized configuration for a model to incremental."
Reference for B: The same section explains the second step: "You also need to tell dbt how to filter the rows for an incremental run... using the isincremental() macro." This macro is used within a WHERE clause.
Reference for D: The section "How do I use uniquekey?" states: "The optional uniquekey parameter enables updating existing rows instead of just appending new rows. If a uniquekey is specified
dbt will use a merge statement to build the model."
2. dbt Labs Documentation
"About materializations":
Reference for C: This page defines the incremental materialization: "Models can be configured as incremental... dbt will insert new records and update existing records in the table." This confirms materialized='incremental' is the foundational configuration.
3. dbt Labs Documentation
"BigQuery configs" (as an example of adapter-specific configs):
Reference for A: The partitionby configuration is listed as a specific configuration for warehouses like BigQuery to improve query performance by partitioning tables. It is described as a physical layout property
distinct from the logical filtering (WHERE clause) or update strategy (uniquekey) of the incremental model itself.
Keep practicing
Take the free DBT-ANALYTICS-ENGINEERING practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DBT-ANALYTICS-ENGINEERING practice questions
- Question 1What is the purpose of the --resource-type argument in the dbt ls command?
- Question 3When fixing a dbt model issue, it is acceptable to skip the testing process in a separate…
- Question 4You want to run tests on only the models that have been modified since your last dbt run.…
- Question 5You discover that a dbt model is directly referencing a raw object in the database withou…
- Question 6What is the purpose of the dbt deps command in the dbt workflow?
- Question 7Which of the following commands will generate compiled SQL code and save it to the "targe…
