Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clickhouse/sink: deleted system column not used in shema #219

Open
work-vv opened this issue Feb 17, 2025 · 0 comments · May be fixed by #231
Open

Clickhouse/sink: deleted system column not used in shema #219

work-vv opened this issue Feb 17, 2025 · 0 comments · May be fixed by #231
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@work-vv
Copy link

work-vv commented Feb 17, 2025

Clickhouse target tables contain system column __data_transfer_delete_time for soft deletes. But it is not compatible and not included in schema creation which only contains __data_transfer_commit_time as following ENGINE=ReplacingMergeTree(__data_transfer_commit_time). But official doc says it can handle deletes as well ENGINE = ReplacingMergeTree(Version, Deleted). First approach can not be filtered with FINAL and require extra effort on selection for each table like ... WHERE table.__data_transfer_delete_time=0. Not clear the purpose of soft deletes and it would be nice to have the original deleted option support as well.

@work-vv work-vv changed the title Deleted system column not used in Clickhouse shema Clickhouse: deleted system column not used in shema Feb 17, 2025
@laskoviymishka laskoviymishka added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Feb 17, 2025
@laskoviymishka laskoviymishka changed the title Clickhouse: deleted system column not used in shema Clickhouse/sink: deleted system column not used in shema Feb 22, 2025
laskoviymishka added a commit that referenced this issue Feb 25, 2025
- Introduce `__data_transfer_is_deleted` generated column for tracking deletions
- Update ClickHouse destination model to support deletable flag
- Extend sink parameters interface with `IsDeleteable()` method
- Automatically derive deletable status from transfer options

Closes: #219
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants