# \[ClickHouse × dbt\] Snapshot keeps writing an extra version after every change

**URL:** <https://discourse.getdbt.com/t/clickhouse-x-dbt-snapshot-keeps-writing-an-extra-version-after-every-change/19913>\
**Category:** Help\
**Tags:** dbt-core\
**Created:** [July 23, 2025, 7:46am UTC](https://discourse.getdbt.com/t/clickhouse-x-dbt-snapshot-keeps-writing-an-extra-version-after-every-change/19913 "2025-07-23T07:46:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vonschultz666](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/vonschultz666/32/3838_2.png) [@vonschultz666](https://discourse.getdbt.com/u/vonschultz666)\
**Post date:** [July 23, 2025, 7:46am UTC](https://discourse.getdbt.com/t/clickhouse-x-dbt-snapshot-keeps-writing-an-extra-version-after-every-change/19913/1 "2025-07-23T07:46:30Z")

</div>

Has anyone run into this?

```
Warehouse: ClickHouse 25.6, plain MergeTree
dbt adapter: dbt-clickhouse 1.9

```

unique\_key: vat\_number  
strategy: check  
check\_cols: [registration\_number] # only one stable column  
dbt\_valid\_to\_current: toDateTime(‘2100-01-01 00:00:00’)  
query\_settings:  
join\_use\_nulls: 1  
apply\_mutations\_on\_fly: 1 # also tried mutations\_sync=1Behavior:

First snapshot run – writes one row, dbt\_valid\_to = 2100-01-01 00:00:00 ✅  
Second run after a real data change – old row is closed (dbt\_valid\_to = now()), but the new “current” row is also saved with dbt\_valid\_to = now() instead of 2100-01-01 ❌  
Third run (no data change) – third row emerges with correct dbt\_valid\_to value - dbt\_valid\_to = 2100-01-01 00:00:00 ✅.

Why would the INSERT … VALUES (…) sometimes use current time instead of the configured future date?
