incremental merge based on ID

I’m new to dbt and i have this incremental table. But i’m not sure if my understanding of it is correct.
this is my code:

{{
    config(
        materialized='incremental',
        unique_key='ID',
        incremental_strategy='merge'
    )
}}

select * from {{ref('my_tbl')}}

the way i understand it it works like this:
if the unique_key in this case ‘ID’ exists it should update the whole row, and if it doesn’t exist it inserts it
is this correct?
if so can i leave the is_incremental() out? since in this table there are no date columns and it’s based of the ID column.

Hi @hamzaou
if the unique_key in this case ‘ID’ exists it should update the whole row, and if it doesn’t exist it inserts it Yes, you are correct.

In your model you are reading from my_tbl. Every time you run the dbt model it reads complete data from my_tbl and upserts the target table. In this case building dbt table takes more time.
Instead of this you can use is_incremental() macro to read only the updated data from my_tbl.

As this your model doesn’t have any timestamp fields its ok to not use is_incremental() macro