I have created table and trying to insert the values multiple time to check the duplicates. I can see duplicates are inserting. Is there a way to avoid duplicates in clickhouse table?
CREATE TABLE sample.tmp_api_logs ( id UInt32, EventDate Date) ENGINE = MergeTree(EventDate, id, (EventDate,id), 8192); insert into sample.tmp_api_logs values(1,'2018-11-23'),(2,'2018-11-23'); insert into sample.tmp_api_logs values(1,'2018-11-23'),(2,'2018-11-23'); select * from sample.tmp_api_logs; /* ┌─id─┬──EventDate─┐ │ 1 │ 2018-11-23 │ │ 2 │ 2018-11-23 │ └────┴────────────┘ ┌─id─┬──EventDate─┐ │ 1 │ 2018-11-23 │ │ 2 │ 2018-11-23 │ └────┴────────────┘ */