Analytics on a MongoDB app usually starts inside MongoDB, as an aggregation pipeline that groups orders by status. It works until the collections grow and those aggregations compete with the writes the application depends on. That is when MongoDB to ClickHouse comes up, because ClickHouse is made for the scans MongoDB is not.
The hard part is keeping the two in step. Documents are rewritten in place, so an exported file never shows an update as a change.
The common ways to move the data:
ClickPipes for MongoDB . Change data capture (CDC) through change streams, run by ClickHouse Cloud, into ReplacingMergeTree tables with the documents kept as JSON. It exists on ClickHouse Cloud only, is billed per ClickPipe, and leaves ClickHouse as the only reader.
The MongoDB table engine . No copy at all. ClickHouse reads the current document on every query, so the load you wanted to move stays on MongoDB.
Debezium, Kafka and the ClickHouse Kafka engine. Changes land within seconds.…