Skip to main content
Data Engineering

Change Data Capture From ERP Into a Lakehouse: Log-Based CDC vs Nightly Batch

The nightly batch that reloads your ERP into the lakehouse is simple, familiar, and slowly becoming the reason your data is always a day old and your ERP is slow at 2am. Log-based CDC is the alternative — and it is a real trade-off, not a free upgrade.

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

15 October 2026 · 10 min read

The bottom line

Moving ERP data into a lakehouse comes down to two patterns. Nightly batch re-extracts tables on a schedule — simple, well-understood, but it loads the ERP heavily during the batch window, leaves data up to a day stale, and struggles to see deletes. Log-based change data capture reads the database transaction log and streams inserts, updates and deletes as they happen — near-real-time, light on the source during business hours, and it captures deletes natively — at the cost of more setup, log access on the ERP database, and operational complexity. The right choice is per requirement: batch where daily freshness is fine and simplicity wins; log-based CDC where you need current data, cannot hammer the ERP in a window, or must capture deletes reliably. Many estates run both — CDC on the high-value transactional tables, batch on the slow-changing reference data.

Why Nightly Batch Is the Default

Almost every ERP-to-analytics pipeline starts as a nightly batch: at 2am, extract the tables you need, load them into the lakehouse, refresh the reports, done by morning. It is the default for good reasons — it is simple to build, easy to reason about, and it fits the mental model everyone already has of "last night’s data is ready today".

For a great many reporting needs, that is genuinely enough. A management pack read each morning, a month-end close, weekly KPI trending — none of these need data fresher than the overnight run, and a batch pipeline serves them reliably with minimal moving parts.

The reason to look past batch is not fashion. It is that three specific pressures — freshness, source load, and deletes — eventually make the simple pattern the limiting factor, and that is when log-based CDC earns its complexity.

Where Batch Runs Out

The first limit is freshness. A nightly batch means every number is up to a day old; an operations team that needs to act within a shift cannot wait for tomorrow’s load. The batch window itself cannot simply be run more often without hitting the second limit.

That second limit is source load. Re-extracting large tables hammers the ERP during the batch window, and on a system that also serves overnight jobs — or that operates across time zones where "2am" is someone else’s business hours — that load is a real cost. Running the batch every hour to improve freshness multiplies the load, often to the point the ERP team objects.

The third limit is deletes, and it is the quiet one. A naïve batch that extracts "rows modified since yesterday" cannot see a row that was deleted — the row is gone, with no timestamp to catch it. Full reloads see deletes but are expensive; incremental batches are cheap but miss them. This is exactly how cancelled orders linger as open in the lakehouse long after the ERP removed them.

Three pressures push you off nightly batch: data that must be current within a shift, an ERP you cannot hammer in a window, and deletes a "modified since" extract can never see.

How Log-Based CDC Works

Log-based change data capture reads the database’s own transaction log — the record the database keeps of every committed change — and streams those changes out as a feed of inserts, updates and deletes, in order, as they happen. Instead of asking the ERP "what changed?", it watches what the database already wrote down.

This fixes all three batch limits at once. Freshness becomes near-real-time, because changes flow continuously rather than in a nightly window. Source load during business hours drops sharply, because reading the log is far lighter than re-extracting tables — the database already produced the log for its own recovery. And deletes are captured natively, because a delete is a logged event like any other, carrying the information needed to apply it downstream.

On a Microsoft Fabric estate this often arrives through Mirroring, which replicates a source database into OneLake as Delta tables with low latency and no pipeline to hand-build; on Databricks the equivalent lands through Delta Live Tables or a streaming ingest. Either way the lakehouse receives a change feed carrying the operation type, which is exactly what downstream logic needs to stay in step with the ERP.

The Cost of CDC

Log-based CDC is not a free upgrade, and selling it as one leads to disappointment. It needs access to the database transaction log, which the ERP or database team must enable and which some locked-down or SaaS ERPs do not expose at all — and where it is not available, CDC is simply off the table for that source. The setup is more involved than a batch extract, and it introduces a streaming component that has to be operated, monitored and reasoned about when something lags.

There is also real engineering in applying the change feed correctly — ordering, idempotency so a replayed change does not double-apply, and handling schema changes in the source. A streaming pipeline that is built carelessly can drift from the source just as a batch can, only in more complicated ways. CDC removes the batch problems and adds streaming ones; it does not remove the need for discipline.

So the honest framing is a trade: CDC buys freshness, lighter source load and native deletes, and pays in setup, log access and operational complexity. On a slow-changing reference table read once a day, that trade is a bad one. On a high-volume orders table that operations act on within the hour, it is clearly worth it.

CDC is a trade, not a free upgrade: it buys freshness, lighter source load and native deletes, and pays in setup, transaction-log access and operational complexity. Match the trade to the table.

Choosing Per Table, Not Per Estate

The decision is rarely "CDC or batch" for the whole estate — it is per table, by requirement. Put log-based CDC on the handful of high-value transactional tables where freshness, source load or deletes actually matter: orders, shipments, inventory movements, financial postings. Leave nightly batch on the slow-changing reference and master data — product, customer, chart of accounts — where daily is fine and simplicity is a virtue.

This hybrid is usually the right answer because it spends complexity only where it pays. You get near-real-time, delete-aware feeds on the tables operations live on, and cheap, simple batch on everything that does not need more. The estate as a whole stays as simple as it can be while being as fresh as it needs to be.

So decide table by table against three questions: how fresh does this genuinely need to be, can the source bear repeated extraction, and do deletes matter here? Where the answers are "current", "no" and "yes", CDC earns its place. Where they are "daily is fine", "yes" and "not really", batch is the better engineering. Most estates land on a mix — and that mix, chosen deliberately, is the mark of a platform designed rather than defaulted.

If your lakehouse is always a day behind the ERP, or cancelled orders keep showing as open, the extraction pattern is the thing to revisit. 30 minutes with Amit on CDC versus batch for your ERP tables and what each would take. No slides, no pitch deck, no obligation to proceed.

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.

Data EngineeringData IntegrationCDCSAPMicrosoft Fabric

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

What is the difference between log-based CDC and nightly batch for ERP data?

Nightly batch re-extracts tables on a schedule — simple and familiar, but it loads the ERP heavily in the batch window, leaves data up to a day stale, and cannot reliably see deletes. Log-based change data capture reads the database transaction log and streams inserts, updates and deletes as they happen — near-real-time, light on the source during business hours, and it captures deletes natively — at the cost of more setup, transaction-log access on the ERP, and operational complexity. Choose per table by freshness, source-load and delete requirements.

Why does nightly batch miss deleted ERP records?

An incremental batch typically extracts "rows modified since the last run", and a deleted row has no modification timestamp to catch — it is simply gone from the source. Full reloads see deletes but are expensive, so cheap incremental batches quietly miss them, which is how cancelled orders linger as open in the lakehouse. Log-based CDC captures deletes natively because a delete is a logged transaction like any other.

When should you use CDC instead of batch extraction?

Use log-based CDC on high-value transactional tables where you need current data (operations acting within a shift), cannot hammer the source with repeated extraction, or must capture deletes reliably — orders, shipments, inventory movements, financial postings. Keep nightly batch on slow-changing reference and master data where daily freshness is fine and simplicity wins. Most estates run a deliberate mix rather than one pattern everywhere.

How does change data capture work with Microsoft Fabric?

On Fabric, log-based change capture often arrives through Mirroring, which continuously replicates a source database into OneLake as Delta tables with low latency and no hand-built pipeline, preserving the change operations. The lakehouse receives a change feed carrying insert, update and delete, which downstream logic applies with an idempotent MERGE. Where the source transaction log is not accessible, CDC is not possible for that source and a batch or periodic reconciliation pattern is the fallback.

Related FAQs

Questions operations leaders ask

Is this the challenge you’re facing?

Half an hour on your operation — what’s achievable, roughly what it costs, and whether it’s even worth doing. No deck.