Back to projects PT
Case study

MongoDB to Databricks migration

Migration of a MongoDB database to the Lakehouse with incremental loading of million-row tables.

Paytime · 2025

Problem

The company's most critical data lived in MongoDB, making large-scale analytics and platform integration hard — including transaction tables with millions of rows.

Architecture

flowchart LR
  M[(MongoDB)] --> DF[Mongo Data Federation]
  DF --> S3[(AWS S3)]
  S3 --> SP[Spark / Databricks]
  SP --> INC[Incremental load]
  INC --> DL[(Delta Lake)]
  classDef a fill:#0d1525,stroke:#3b82f6,color:#e2e8f0
  classDef g fill:#0d1525,stroke:#10b981,color:#e2e8f0
  class M,DF,S3,SP a
  class INC,DL g

Solution

  • Used MongoDB Data Federation to expose the data.
  • AWS S3 staging layer as a bridge into Databricks.
  • Incremental load routines with Spark to handle large volumes.
  • Materialization in Delta Lake with regular updates.

Results

  • Critical data available for analytics in the Lakehouse.
  • Robust, regular update routine, even for million-row transaction tables.
  • MongoDB integrated into the rest of the data platform.

Stack

MongoDB AWS S3 Databricks Spark Delta Lake