Running an incremental model with full-refresh is not working

I’m trying to run an incremental model with full-refresh run using:
dbt build --full-refresh --select L3__daily_users_activity

but it seems like it runs it on a regular way - incremental.

The logs also shows it runs as incremental and my DB really running only incremental run

... 
10:59:25  1 of 6 START sql incremental model DBT_SHAYM.L3__daily_users_activity .......... [RUN]
10:59:29  1 of 6 OK created sql incremental model DBT_SHAYM.L3__daily_users_activity ..... [SUCCESS 1 in 3.97s]
...
["START sql incremental..."]

not sure what do i miss here. how can i make it really run with full-refresh?

if the model is incremental then in the log message it shows like this only even though if you do/don’t full-refresh

Check-1:-
open db.log file configured in (as defined by the log-path config) and check if dbt is executing
create or replace table DBT_SHAYM.L3__daily_users_activity statement or not. if it is doing that then it is doing full-refresh

Check:-2
Check if the model is configured full_refresh: false or not. if specified to false then model will not full-refresh when dbt run --full-refresh is invoked.

2 Likes

Thanks @Surya

Just to make sure i’m looking on the right place - its the logs/dbt.log file on my local project?
If so, i see:create or replace transient table:

create or replace transient table DBT_DEV.DBT_SHAYM.L3__daily_users_activity  as
        (...)

not sure what transient means :joy:

about the full_refresh - the model is not flagged with full_refresh = False
The only thing related to materialized configuration is declared on the model .sql file as:

{{
    config(
        materialized='incremental',
        incremental_strategy='merge',
        unique_key=['date', 'user_id']
     )
}}
....

So I still can’t really run a full-refresh

@shayms8

by default dbt creates transient models

For more about transient models Working with Temporary and Transient Tables | Snowflake Documentation

After seeing the logs i can confirm that dbt is doing full-refresh.

Note:
For full-refresh/incremental mode u will get the same logs to ur console.


> 10:59:25  1 of 6 START sql incremental model DBT_SHAYM.L3__daily_users_activity .......... [RUN]
> 10:59:29  1 of 6 OK created sql incremental model DBT_SHAYM.L3__daily_users_activity ..... [SUCCESS 1 in 3.97s]

if the model is incremental then in the console log messages it shows like this only even though if you do/don’t full-refresh

You shouldn’t say dbt is running in full-refresh/ not full-refresh mode by just looking at the console logs that dbt is generating for incremental models. You have to check the dbt.log file if it’s executing create or replace that means it’s running in full-refresh mode.

I hope you got the answer