Un-sharding a ClickHouse Distributed Table into ReplicatedMergeTree
How to turn a sharded Distributed + MergeTree table into a single ReplicatedMergeTree table with a full copy on every node: freezing writes, creating the table with a shard-free ZooKeeper path, copying with INSERT ... SELECT, verifying with checksums, and cutting over safely. Rehearsed step by step on dummy data.
October 20, 202610 min read