# MongoDB + ClickHouse

> Automatically sync MongoDB collections and documents to ClickHouse. Build an incremental pipeline with schema drift detection and full observability.

Source: https://www.erathos.com/en/pipelines/mongodb-clickhouse
Em português: https://www.erathos.com/pipelines/mongodb-clickhouse

MongoDB is an open-source, document-oriented NoSQL database management system. ClickHouse, on the other hand, is a serverless Big Data solution developed by Google, providing robust storage and data analysis capabilities at scale.

With Erathos, you can integrate data from MongoDB to ClickHouse in just a few minutes. Our platform handles the entire data movement process to your analytical environment, allowing you to blend your data with other sources in your Data Warehouse. This way, your time is focused on what actually drives value — extracting powerful insights and making more data-driven decisions.

### What MongoDB data does Erathos sync to ClickHouse?

The integration automatically syncs key MongoDB objects:

- **Selected tables** — incremental replication of any configured table
- **Schema drift** — new columns are automatically detected and added to the destination
- **Primary keys and timestamps** — used for efficient incremental syncs
- **Historical data** — full initial load followed by incremental updates

### Why sync MongoDB to ClickHouse?

In ClickHouse, you can run OLAP queries on MongoDB data in milliseconds, making it ideal for high-concurrency dashboards and high-volume time-series data.

### How it works

Erathos connects to MongoDB via the official API and syncs your data incrementally — only new or updated records are processed in each run, keeping pipelines fast and ClickHouse costs predictable. You choose the sync frequency (ranging from 5 minutes to daily), the objects to sync, and the target dataset. Every run is logged with full observability: execution time, rows processed, contextualized errors, and instant alerts via Slack or email if anything goes wrong.

## Data in your data warehouse in minutes

### Out-of-the-box MongoDB connector

Replicate MongoDB tables to ClickHouse with incremental synchronization and automatic schema drift detection — without breaking pipelines when the schema changes.

### Full control over your MongoDB pipelines

Configure frequency and sync mode on a per-table basis. Data lands in ClickHouse optimized for OLAP queries, delivering millisecond-level analytics even across millions of rows.

### End-to-end observability

Stop finding out about MongoDB failures only when the business team complains. Every run is logged with execution time, rows processed, and error context. Get automatic alerts in Slack, Discord, or email the moment anything goes off track — keeping replication up to date without impacting the transactional database.

## Centralizing MongoDB data into ClickHouse has never been easier

Erathos is a data ingestion platform built for teams that need to replicate operational databases for analytics. With our MongoDB connector, you can incrementally sync transactional tables and records to ClickHouse—complete with schema drift detection and full execution logs.

## FAQ

### What is Erathos and how can it help my company?

Erathos is a data ingestion platform built for reliability, transparency, and control. We help data teams connect tools like MongoDB to their data warehouse — with complete observability for every run, zero maintenance, and without the opacity of traditional market tools.

### How does Erathos sync data from MongoDB to ClickHouse?

Erathos uses incremental replication to sync tables from MongoDB to ClickHouse. Schema drift is automatically detected — if a column is added or modified in MongoDB, the pipeline adapts without manual intervention.

### How often does Erathos sync data from MongoDB to ClickHouse?

You can configure sync frequencies from every 5 minutes to daily, at the table level. Erathos uses incremental syncs—only new or updated records are processed in each run, keeping your MongoDB pipeline efficient and ClickHouse costs predictable.

### What happens if a MongoDB sync fails?

Erathos automatically detects failures and sends alerts to your email, Slack, or Discord with full context — not just "job failed." Smart retries handle transient errors, and every run is logged with runtime, rows processed, and error context so your team can debug in minutes, not hours.

### Is there a free trial for the MongoDB connector?

Yes. Every Erathos connector comes with a 14-day free trial. Connect MongoDB to ClickHouse and start syncing immediately — no credit card required.
