Incremental ERP Loads to a Warehouse: Tracking Late Changes — Odoo & ERP article by Rui Codex

An incremental load copies only the ERP records that are new or changed since the last successful run, rather than re-extracting whole tables. Reliable change tracking needs a source-side marker such as a modified timestamp, a monotonic ID or database change capture, combined with a re-read window that picks up late corrections to periods already loaded.

Key takeaways

  • An incremental load is only as correct as the marker it uses to find changed rows.
  • Timestamps are common but fail when the ERP writes records late or updates them without touching the timestamp.
  • Late corrections need a deliberate re-read window or partition reprocessing, not hope.
  • Every incremental job should be safe to rerun, which requires merge logic keyed on business identifiers.

What is an incremental load and why not reload everything?

An incremental load moves only the delta between the warehouse and the ERP. A full reload is simpler to reason about, but it grows with the size of the ERP history and holds source tables busy for longer. Most operations teams start with full loads and move to incremental ones when nightly runs stop finishing inside their window.

The trade-off is correctness. A full reload cannot miss a change, because it reads everything every time. An incremental job reads less, so every row it skips must be provably unchanged. That single requirement drives the design of the whole pipeline.

Rui Codex works on these pipelines as part of system integration projects, where the source ERP and the reporting layer are rarely designed to talk to each other.

How do you detect which ERP rows changed?

You detect changes with a marker the source writes on every modification: a last-modified timestamp, an ever-increasing ID, a row version, or a change log produced by the database. Each method has a clear failure mode, and the right choice depends on what the ERP actually guarantees.

Common change-tracking methods

MethodWorks well whenFails when
Modified timestampEvery write updates the column in the same transactionBulk updates skip the column, or clocks and time zones are inconsistent
Increasing IDOnly inserts matter and rows are never edited in placeEdits and deletes happen, or IDs are assigned before commit and committed out of order
Row version or hashThe database supports row versioning and the comparison is cheapThe source is not accessible at row level or hashing whole tables is too costly
Database change captureThe database exposes a reliable change log that is retained long enoughLog retention is short, or the platform restricts access to the log

Timestamps are the most common choice because most ERP tables already carry one. They are also the most fragile. A timestamp written at the start of a long transaction can be older than rows committed after it, so a job that advances its watermark to the maximum timestamp it has seen can silently skip rows that commit later.

Tip: Advance the watermark to the timestamp of the oldest uncommitted work you can detect, minus a safety margin, rather than to the maximum timestamp you read.

Deletes are the hidden problem

An incremental job sees inserts and updates easily. Deletes leave no row to read. Either the source must keep soft-delete flags or a deletion log, or the pipeline must compare keys periodically to find what disappeared.

How should late corrections be handled?

Late corrections are handled by re-reading a bounded window of already-loaded periods on every run, or by reprocessing whole partitions when the ERP reopens them. The window must be long enough to cover the corrections your business actually makes, and short enough that the job still finishes.

Typical late corrections include backdated invoices, reopened accounting periods, credit notes against old orders and master data fixes that change historical attributes. Each one lands in a past period, which an append-only load would never revisit.

  • Define the lookback window per table, based on how the business closes periods.
  • Reprocess whole partitions for closed periods that the ERP is allowed to reopen.
  • Compare keys and hashes inside the window, so unchanged rows do not generate writes.
  • Log every correction the job applies, so finance can reconcile the warehouse against the ERP.
Tip: Treat the lookback window as a business rule agreed with finance, not as a technical constant chosen by the engineer who wrote the job.

What makes an incremental job safe to rerun?

An incremental job is safe to rerun when applying the same batch twice produces the same warehouse state. This is called idempotency, and it is achieved by merging on stable business keys rather than appending rows.

Use the ERP document number plus line number, not a warehouse-generated surrogate, as the merge key where possible. Stage each batch, validate row counts and key uniqueness, then merge in a single transaction. If the job fails halfway, the watermark must not advance, so the next run repeats the same work safely.

Monitoring matters as much as the code. Record each run's window, row counts and watermark, and alert when a run reads zero rows for a table that normally changes every day, because that often means the marker has stopped being written.

Hypothetical examples

Here are two hypothetical scenarios:

Scenario one. A sales table uses a modified timestamp. A nightly job reads rows changed since the previous watermark. A credit note is posted against an invoice from a closed month, and its timestamp falls inside the lookback window, so the job picks it up and the monthly revenue view is corrected on the next run.

Scenario two. A stock table is updated by a bulk adjustment that does not touch the timestamp column. The incremental job reports no changes for that table. The gap is only found when a reconciliation query compares warehouse totals with a periodic full key comparison, which is why that comparison is scheduled weekly.

Implementation checklist

  1. Confirm which marker the ERP writes on every insert, update and delete for each table.
  2. Document how deletes are detected and how often a key comparison runs.
  3. Agree the lookback window and reprocessing rules for closed periods with finance.
  4. Stage batches, validate keys and merge inside one transaction per batch.
  5. Advance the watermark only after a successful merge.
  6. Reconcile warehouse totals against the source on a fixed schedule.

Teams that want a second opinion on their design can read more about integration and API engineering on the Rui Codex blog. For the wider picture of connecting operational systems, the guide on maximizing business efficiency through ERP and CRM integration covers how data flows between systems.

Does personal data in ERP extracts change the design?

Yes, when the extracts contain personal data, the pipeline must keep that data accurate and limited to what the warehouse needs. The GDPR requires that personal data be accurate and, where necessary, kept up to date, which is why late corrections to customer records are not optional. The regulation text is available at EUR-Lex, Regulation (EU) 2016/679. This article is general information and not legal or tax advice. Rui Codex provides technical implementation support only, not legal, tax or compliance advice.

Conclusion

Incremental loads save time only when the change marker, the lookback window and the merge logic are designed together. Start by testing how the ERP really writes updates and deletes, then build the correction window around the periods finance actually reopens. If you are planning a warehouse feed from an ERP and want an engineering review of the design, request a project consultation at Rui Codex or email info@ruicodex.com to discuss your project.

Sources

Frequently Asked Questions

What is the difference between a full load and an incremental load?

A full load re-extracts every row from the source on each run, while an incremental load moves only rows that are new or changed since the last successful run. Full loads are simpler and self-correcting, but they grow with history. Incremental loads scale better but depend on the change marker being written reliably by the source system.

Why does a timestamp-based incremental load miss some rows?

It usually misses rows when the watermark advances to the maximum timestamp read, while another transaction with an earlier timestamp is still committing. The row then appears after the watermark has moved past it. Using a safety margin and a periodic key comparison closes most of this gap.

How long should the lookback window for late corrections be?

The lookback window should cover the longest period the business regularly reopens or corrects after closing. It is a business rule to agree with finance rather than a fixed technical value. Windows that are too short leave corrections missing, and windows that are too long make every run expensive.

Can a failed incremental job be rerun without duplicating data?

Yes, if the job merges on stable business keys and advances the watermark only after a successful merge. Rerunning the same batch then produces the same warehouse state. Appending rows without a merge key is the usual cause of duplicates after a failed run.

How do deleted ERP records reach the warehouse?

Deleted records reach the warehouse through soft-delete flags, a deletion log in the source, or a periodic comparison of keys between source and warehouse. Without one of these, an incremental job cannot see that a row has disappeared. The comparison can run less often than the main load.

Tags: incremental load ERP integration data warehouse change data capture late corrections ETL API integration data reconciliation

Need Help Implementing This?

Our team can help you put these insights into practice. From AI automation to custom software development, we build solutions that deliver real results.

Send a project request