Exam dbt-Analytics-Engineering Topic 1 Question 19 Discussion
Actual exam question for dbt Labs's dbt-Analytics-Engineering exam
Question #: 19
Topic #: 1
Question #: 19
Topic #: 1
You are building an incremental model.
Identify the circumstances in which is_incremental() would evaluate to True or False.

Identify the circumstances in which is_incremental() would evaluate to True or False.

Suggested Answer:

Explanation:
1. There is a config block at the top of the model with materialized = 'table'
## Answer: False
2. The corresponding table already exists in the data warehouse
## Answer: True
3. The incremental model was executed with the --full-refresh flag
## Answer: False
4. The corresponding table does not already exist in the data warehouse
## Answer: False
The is_incremental() macro in dbt is used within an incremental model to determine whether the current invocation should perform an incremental update or a full rebuild. It evaluates to True only during an incremental run when the target table already exists in the data warehouse and dbt is not performing a full refresh.
For is_incremental() to return True, two conditions must be met:
* The model must be materialized as incremental, not table or view.Therefore, if the config specifies materialized = 'table', the model is not incremental, and the function evaluates to False.
* The table already exists in the target schema.In this case, dbt will run the model in incremental mode, making is_incremental() return **True`.
If the incremental model is run with --full-refresh, dbt intentionally rebuilds the entire table, meaning is_incremental() evaluates to False, even if the table exists.
Lastly, if the target table does not exist yet, dbt must create it from scratch, so the run is treated as a full rebuild, not an incremental update, causing is_incremental() to evaluate to False.
Thus, the only scenario where is_incremental() returns True is when the table exists and the model is actually incremental.
by Larry at Dec 22, 2025, 11:16 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).