# BUG in dbt snapshots

**URL:** <https://discourse.getdbt.com/t/bug-in-dbt-snapshots/20166>\
**Category:** Help\
**Created:** [August 21, 2025, 4:00am UTC](https://discourse.getdbt.com/t/bug-in-dbt-snapshots/20166 "2025-08-21T04:00:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![justdbting](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@justdbting](https://discourse.getdbt.com/u/justdbting)\
**Post date:** [August 21, 2025, 4:00am UTC](https://discourse.getdbt.com/t/bug-in-dbt-snapshots/20166/1 "2025-08-21T04:00:56Z")

</div>

I’m new to dbt and diving deep. I believe there is a bug in how snapshot insertions are processed and handled.

For starters, it is not uncommon for tables to have an etl\_create\_date and an etl\_update\_date. In testing my snapshot, I created a raw table with mocked up records, giving them an etl\_create\_date of current\_timestamp() and a null etl\_update\_date. When updates are made to the table, the etl\_update\_date gets updated with the current\_timestamp(). This is a valid, normal scenario.

I run the snapshot with etl\_update\_date as my update\_at configuration, and the snapshot table does not populate the dbt\_updated\_at or dbt\_valid\_from date. What this tells me is dbt won’t accept null values in the updated\_at config value. I don’t agree with that.

If you examine the logs, the insertions\_source cte has the dbt\_updated\_at and dbt\_valid\_from value as my null etl\_update\_date. So at this point, all the dbt dates in my snapshot are null. At the very least, why doesn’t dbt just add a coalesce around this and populated current\_timestamp() if my value is null?

```auto
    insertions_source_data as (

        select *, 
    
        claim_num as dbt_unique_key
    
,
            etl_update_date as dbt_updated_at,
            etl_update_date as dbt_valid_from,
            
  
  coalesce(nullif(etl_update_date, etl_update_date), null)
  as dbt_valid_to
,
            md5(coalesce(cast(claim_num as varchar ), '')
         || '|' || coalesce(cast(etl_update_date as varchar ), '')
        ) as dbt_scd_id

        from snapshot_query
    )

```

If I then mock up one of my raw record with a change, to see if the snapshot table adds the subsequent record, nothing will change in my snapshot because the dbt dates are all null. The insertions and updates cte in the logs reference this below. Again, why don’t they use a coalesce around the dbt\_valid\_from value and use something like ‘1900-01-01’? It does not logically make sense that the updated\_at config value cannot be null.

`snapshotted_data.dbt_valid_from < source_data.etl_update_date`
