Skip to main content
Manufacturing

How to Connect ERP and MES Data into a Fabric Lakehouse

The ERP says Line 3 produced 4,820 cases last week. The MES says 5,090. Both are right — they count different things. The connectors are the easy half; the gap is definitional, and it decides whether your OEE number is believed.

Amit Kumar Singh - Technology Consulting Partner at MyData Insights

Technology Consulting Partner · MyData Insights

14+ years in industrial data · Former Accenture & EY · India, GCC, SEA

20 August 2026 · 13 min read

The bottom line

ERP and MES both claim to know what was produced, but they record it at different granularity, on different clocks, against different identifiers and in different units. Ingestion into a Fabric lakehouse is the easy half — mirroring, Copy job or Eventstream land both systems in a fortnight. The join is where it breaks: identifier formats, time zones and event definitions, MES lot IDs that never reach ERP, and reporting-versus-base units. For every shared entity, operations must decide which system is authoritative, the tolerance, and what happens when they disagree beyond it. Reconciliation and modelling agreement is 50–70% of the elapsed time; ingestion is 20–30%.

Two numbers land in the same Monday meeting

The ERP says Line 3 produced 4,820 cases last week. The MES says 5,090. The gap is definitional, not a data-quality defect: the MES counted every unit past the end-of-line sensor, including cases later held for a label defect and units run as line-start setup pieces; the ERP counted what was confirmed against the production order and goods-received.

This is why ERP-to-MES work scoped as "integration" overruns. The connectors are the easy half — Fabric will land both systems in OneLake inside a fortnight. The hard half is making one believable number out of two systems that describe the same shift in incompatible terms.

Why is joining ERP and MES data harder than connecting them?

They overlap on one object — the production order — and diverge everywhere around it.

ERP holds the plan and financial consequenceMES holds the execution
ContentWork orders, planned quantities, BOMs, routings, standard times, inventory movements, standard costs, the goods receiptActual start/stop by operation, operator, shift, machine, downtime events with reason codes, scrap by defect, in-process quality, MES-generated lot IDs
ClockPosting dateMachine time
GranularityUsually the order, sometimes the operation, rarely the unitThe event

The overlap is thin and treacherous — order number, product, plant, quantity, date — and all five are traps.

Where exactly does the join break?

Four failures account for most ERP–MES join defects. Identifiers — ERP order numbers are commonly zero-padded fixed-width strings, while the MES operator keyed the same order without leading zeros, or the line PLC appended a sequence suffix. Timestamps — two problems wearing one coat: different time zones, and different event definitions of "start". Batch and lot — MES generates lot IDs during the run for traceability, and in many estates they never travel back to ERP, which knows only the order and the material. Units of measure — ERP keeps a base stock-keeping unit plus alternative units with conversion factors, while MES counts what the sensor counts.

Which reconciliation rules must be agreed before you model anything?

For every shared entity, operations must decide which system is authoritative, the tolerance, and what happens when the two disagree beyond it. An engineer cannot make this call. Take this to the Operations Director, the plant quality lead and the ERP functional owner, and do not leave without a decision in each row.

EntityWhat differs (ERP vs MES)Rule to be agreed
Work orderOrder header vs order keyed at the lineCanonical format; who owns the crosswalk for MES orders ERP never created
OperationRouting operation vs MES step sequenceStep-to-operation mapping; do MES steps absent from the routing count as production time?
Produced quantityGoods-receipt vs end-of-line counterWhich is authoritative, and the tolerance (0.5–2%) above which a variance is investigated
ScrapScrap confirmation vs reject counts by defectDo in-process rejects that never reached a stock posting count as scrap, yield loss, or neither?
ReworkRework order vs second-pass countDoes a reworked unit count once or twice? (shifts first-pass yield 3–8 points)
Material consumptionBackflush at standard vs actual issueDoes Gold report standard or actual consumption, and where does variance surface?
Batch / lotBatch master vs MES-generated lot IDsAre MES lots pushed to ERP, and if not, where is genealogy stitched?
Downtime eventNot held (or one delay reason) vs event with duration and reasonThe single taxonomy; are unmanned periods planned or unplanned?
Machine / work centreWork-centre master vs machine/asset IDThe mapping when one ERP work centre covers several machines
ShiftFactory calendar vs MES shift patternWhich calendar defines planned busy time — the input OEE is most sensitive to

Write the decisions down and put a name against each. That document stops the argument reopening in month four, and it is the deliverable most estates never produce.

The reconciliation table is the deliverable most estates never produce. Get a name against every row before a pipeline is built.

How do you ingest each system into a Fabric lakehouse?

ERP typically arrives via database mirroring, a native link, or Copy job with change data capture — Fabric supports mirroring from SQL Server, Oracle, Azure SQL, PostgreSQL, Snowflake, Cosmos DB and SAP, with more in preview. MES typically arrives via direct database extraction, a vendor API, a file drop referenced by a OneLake shortcut, or an historian bridge through Eventstream.

Most mid-market MES products run on SQL Server or Oracle underneath, which puts mirroring or Copy job on the table immediately — subject to the vendor's support position, which you check before enabling CDC on a system somebody else warrants. On latency: mirroring is near real-time (conditioned on network, change volume and gateway), Copy job is as fresh as its schedule.

What conformed dimensions make the join possible?

Six conformed dimensions carry an ERP–MES model: work order, product, plant and work centre, shift calendar, machine or asset, and reason code. Each is built once in the Silver layer with a surrogate key and a documented crosswalk from every source identifier, so facts from ERP and MES land on the same keys.

Bronze holds both systems raw. Silver is where the crosswalk work happens: identifier normalisation (padding rules applied once, not in fourteen Power BI measures), time-zone conversion to one stated standard with local time retained alongside, dated UOM conversion factors, and the machine-to-work-centre mapping. The crosswalk tables are small and boring — a few thousand rows — and the highest-value asset in the estate, because they cannot be regenerated from the source systems.

The downtime reason-code taxonomy problem

OEE credibility is decided by the downtime reason-code taxonomy, not by the calculation. Most plants have accumulated 80 to 300 free-text or duplicated reason codes across lines, with an "Other" bucket absorbing 20–40% of recorded stops. The failure is predictable: each line was commissioned by a different integrator, so "no material" exists as NOMAT, NO-MAT, Material Shortage and Starved.

Do three things. Collapse the codes into a two-level taxonomy of category and reason — roughly 8 categories and 40–60 reasons for a mid-market plant. Map every legacy code to the new taxonomy in a crosswalk. And fix capture at the line so new stops land in the taxonomy, not back in free text — otherwise the cleanup decays within a quarter.

What belongs in the Gold model

The Gold layer holds one fact table per grain — production confirmation, downtime event, quality result, material movement — joined to the conformed dimensions, with OEE, first-pass yield, scrap rate and schedule adherence calculated once as certified measures. ISO 22400-2 defines OEE as availability × effectiveness × quality rate, and the OPC UA machine-tool companion specification notes that planned busy time and planned run time must come from the connected MES or ERP, not from the machine.

That is this article's argument restated by a standards body: the machine knows when it was executing; the ERP knows the plan; the OEE denominator needs both. Calculate once, in the semantic model, and let Power BI, Excel and any agent read the same measure — the moment OEE exists in two places it will exist in two values and the plant will trust neither.

Where this breaks — and what it does not fix

Reconciliation is a decision, not a calculation, and it can stall indefinitely — if the Operations Director and the plant manager disagree on whether setup pieces count as production, no architecture resolves it. MES vendor support positions bite late — enabling CDC on a warranted MES database, or reading it directly, may sit outside your support agreement. Nightly batch will not support intervention — yesterday's OEE informs a weekly review, not a shift decision.

Retrospective genealogy cannot be recovered — if MES lot IDs were never linked to ERP shipments, the lakehouse cannot invent the link for last year. A conformed model does not correct master data — duplicate material masters and routings with standard times last reviewed in 2018 replicate faithfully into OneLake. And most of this work is conversations, not pipeline development: reconciliation and modelling agreement typically consumes 50–70% of elapsed time, ingestion 20–30%.

What to do first

Five questions, answerable this week, none requiring a purchase:

  • Pull last month's produced quantity for one line from ERP and MES and put them side by side — the size and direction of the gap tells you which reconciliation rules matter most
  • Export the distinct downtime reason codes from MES and count them — if over 100, or "Other" exceeds 20% of stopped minutes, taxonomy work is the first deliverable
  • Find out what your MES actually runs on — SQL Server, Oracle, a proprietary store, or an API only — and what the vendor permits you to read
  • Write down the definition of "start" in both systems; if you cannot get an unambiguous answer in a day, that is the finding
  • Name the person allowed to decide which system is authoritative for produced quantity; if there is none, appoint one before scoping anything

A sensible first slice: one line, one product family, one month of history, reconciled against the plant's existing manual OEE calculation until the two agree or the difference is explained. The second line then takes days rather than weeks. We run the reconciliation workshop before the first pipeline, because that sequence produces a number the plant defends rather than disputes.

The fastest way to know which reconciliation rules matter is to put last month's ERP and MES produced quantity for one line side by side and read the gap. Then name the person who can decide which one is authoritative. Book a diagnostic with Amit — no slides, no pitch deck, no obligation to proceed. We run the reconciliation workshop before the first pipeline, so you get a number the plant defends rather than disputes.

Free Assessment

Where does your operation sit on the data maturity curve?

8 questions. 3 minutes. You get a scored breakdown across data infrastructure, analytics readiness, and automation potential — with a specific next step for your industry.

ManufacturingMicrosoft FabricMESERPOEE

Your Data · Our Technology · Our Automation

Get practical insights every fortnight

Amit writes about Microsoft Fabric, Power BI, AI in operations, and digital transformation for manufacturing and supply chain leaders. Practitioner perspective - no fluff, no vendor spin.

No spam. Unsubscribe any time. Also on Substack.

FAQ

Common questions

Why don't ERP and MES production quantities match?

Because they count different things. MES counts units past a sensor or good-part counter in real time; ERP counts what was confirmed or goods-received against the production order, often the next morning and often rounded to a handling unit — plus setup pieces, held units and rework treated differently in each.

Do I need an MES to calculate OEE in Microsoft Fabric?

You need both. ISO 22400-2 defines OEE as availability × effectiveness × quality rate, and the planned busy time and planned run time have to come from the connected MES or ERP, not from the machine — so the denominator needs the plan and the execution together.

How do I ingest MES data into a Fabric lakehouse?

Four common routes: mirroring or Copy job against the MES database where the vendor permits it and the platform is supported; a vendor API; a file drop referenced by a OneLake shortcut; or an historian bridge through Eventstream. Check the vendor support position before enabling CDC.

How fresh can ERP and MES data be in Fabric?

Fabric database mirroring can publish changes as fast as every 15 seconds, subject to network, change volume and gateway capacity. Copy job is as fresh as its schedule, commonly hourly to nightly — but nightly batch informs a weekly review, not a shift decision.

Who should decide which system is authoritative for produced quantity?

Operations, not the data team. It is an operating definition with financial and performance-management consequences, so it needs an accountable owner — usually the Operations Director or plant manager — with the ERP functional owner and quality lead in the room.

How long does an ERP–MES integration in Fabric take?

For one line and one product family, a first reconciled slice in six weeks is realistic. Expect 50–70% of the elapsed time to be reconciliation and modelling agreement rather than pipeline development — the connectors are the fast part.

Is this the challenge you're facing?

Book a 30-minute call. We'll look at your specific operation and tell you what's achievable - plainly and without slides.