How to provide version for ReplicatedReplacingMergeTree

14 views
Skip to first unread message

Deepanwita Roy

unread,
Apr 13, 2020, 1:34:30 AM4/13/20
to ClickHouse
I have a ReplicatedReplacingMerge Tree where I want to put one of the columns as the version key. 

CREATE TABLE buybox.local_table1 (

column1 String,

column2 DateTime

) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/buybox_shard_8/item_pricing_new/events', 'replica_1', 'column2') PARTITION BY column1 ORDER BY (column1) SETTINGS index_granularity = 8192;


I think it is versioning by the timestamp the data is persisted in the database rather than the version. Do we need to define this table any differently.



Denis Zhuravlev

unread,
Apr 14, 2020, 11:13:57 AM4/14/20
to ClickHouse
without quotes '

CREATE TABLE buybox.local_table1 (

column1 String,

column2 DateTime

) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/buybox_shard_8/item_pricing_new/events', 'replica_1', column2) PARTITION BY column1 ORDER BY (column1) SETTINGS index_granularity = 8192;

Reply all
Reply to author
Forward
0 new messages