ClickHouse / ClickHouse/dbt-clickhouse

snapshot invalidate_hard_deletes feature

Open
#291 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
362
Forks
177
Avg merge
2d 10h
Merged PRs (30d)
8

Description

**Is your feature request related to a problem? Please describe.**
invalidate_hard_deletes=True for snapshots not working with CH because of its default non-nullable column

**Describe the solution you'd like**
dbt general `default__snapshot_staging_table` macro can be modified in two places by changing `{{ strategy.unique_key }}` to `toNullable({{ strategy.unique_key }})` - in `snapshotted_data` and `deletes_source_data` CTEs

Contributor guide

Open the contributing guide

Research direction

Locate the dbt general default__snapshot_staging_table macro and inspect its snapshotted_data and deletes_source_data CTEs. The requested change is complete when invalidate_hard_deletes snapshots work with ClickHouse's non-nullable default column behavior in both CTEs.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.