Skip to main content
CDC & StreamingManufacturer with a public product portal · NDA · Manufacturing

SQL Server ERP to a MongoDB product catalog — field-level change replication across storage models

An ERP on Microsoft SQL Server replicated continuously into the MongoDB product catalog behind a public customer portal and partner e-document exchange. SQL Server CDC and Change Tracking feed Apache Kafka, and each message updates only the fields of the catalog document that derive from the changed table — no document rebuilds.

The challenge

Two storage architectures, one catalog

The company publishes its product line to customers on a public portal and exchanges electronic documents with partners — both driven by a product catalog held in a MongoDB document database. The products themselves are managed in an ERP system on Microsoft SQL Server, where each product’s description, attributes, and component list are spread across many normalized relational tables.

Keeping the catalog current meant bridging two storage architectures, not just two systems. A single catalog document aggregates rows from many ERP tables, so the obvious approach — regenerate the whole document whenever anything upstream changes — is expensive, floods the portal and partner feeds with unchanged data, and loses track of what actually changed.

The company needed catalog documents that follow ERP changes continuously, at the granularity of the change itself, without batch regeneration jobs or extra load on the ERP database.

The solution

Per-table events, field-level updates

A2 built an event-driven replication pipeline on the ERP’s native change capture. Changes to the relational tables are tracked with Microsoft SQL Server CDC and Change Tracking; for each changed table the pipeline generates a message describing exactly what changed and publishes it to Apache Kafka.

On the consuming side, every message is mapped onto the part of the MongoDB document that derives from the changed table — and only that part. An update to the table holding product descriptions changes only the description field of the product document; a change to one component of a product updates only that component’s entry inside the document. Documents are never rebuilt wholesale, so the portal and partner exchange receive precise, incremental updates.

The result is replication not just between heterogeneous systems but between different storage architectures — relational and document — with the granularity of each change preserved end to end. The same pattern is now productized: SQL Server sources and incremental MongoDB document targets are available in Gearacles, the commercial edition of oracdc.

Architecture
SQL Server ERPmany normalized tablesPRODUCTSPRODUCT_DESC · changedCOMPONENTSSQL Server CDC+ Change Trackingwhich table changedApache Kafkaerp.productserp.product_descerp.componentsField mappertable → documentpath, one fieldMongoDB product_id · namedescription ← updcomponents[ 12 ]certificates[ ]media[ ]Public customer portalPartner e-document exchangeone message per changed table
Fig. 1 · System architecture: each changed ERP table produces one Kafka message; the field mapper rewrites only the matching path in the product document.
PRODUCT_DESCSQL ServerPRODUCT_IDDESCRIPTIONUPDATED_AT4471Stainless valve DN50, PN1612:04:314472Butterfly valve DN80, PN1009:12:074473Check valve DN25, PN4008:40:55Kafka messagePRODUCT_DESC · 4471products · _id 4471MongoDB{name: "Valve DN50",description: "Stainless valve DN50, PN16",UPDATEDcomponents: [ … 12 items … ],certificates: [ … ],media: [ … ],}one field rewritten · 0 document rebuilds
Fig. 2 · What one change does: an updated row in PRODUCT_DESC rewrites the description field of document 4471. The 12-item components array is not touched. Values are illustrative.
Outcomes
Field-level
incremental updates — catalog documents are never rebuilt
2
storage models bridged — relational ERP to document catalog
Event-driven
Kafka delivery to the public portal and partner e-document exchange
Productized
SQL Server to MongoDB replication now available in Gearacles
Environment
Microsoft SQL Server ERPSQL Server CDC & Change TrackingApache KafkaMongoDBGearacles

Client identity is withheld under a non-disclosure agreement. Engagement details can be discussed under NDA where appropriate.

Facing a similar challenge?

Talk to the team that built this; we'll discuss your environment, not a generic slide deck.