This failure does not raise an error. The job succeeds, the row counts look plausible, and the numbers reconcile for most months. Then one period is short, and nobody can explain why.
What the Extract Actually Filters On
A BICC incremental extract works from a last extract date. On each run it asks the source for rows changed since that watermark, using the record's last update timestamp.
That is the correct behaviour for change capture. The problem is what happens next: most downstream models then partition or filter those rows by accounting date or transaction date.
Those are two different clocks. A journal posted today against last month's accounting date has today's update timestamp and last month's accounting date. It arrives in today's extract, and lands in a partition the pipeline already considers finished.
Why It Survives Testing
During implementation you usually run a full extract, then compare totals. Everything matches, because a full extract has no watermark. The gap only appears once you switch to incremental and the first backdated entry arrives after the target period has been loaded.
It also tends to appear first in the periods that matter most. Year-end adjustments, audit corrections and accrual reversals are overwhelmingly backdated. The quietest failure mode is the one that hits your most scrutinised numbers.
The Second Trap: The Extract Window
There is a related issue even when dates are handled correctly. BICC extracts are not instantaneous, and the source keeps committing during the run. A record committed after the extract started but given a timestamp before it can fall between two runs and never be captured.
The usual mitigation is to move the watermark back by a safety margin on each run, so windows overlap rather than abut. That only works if your loads are idempotent, which brings us to the fix.
Fix One: Reload Affected Periods, Not Just New Rows
Instead of appending the incremental rows into their accounting periods, read the incoming batch, collect the distinct accounting periods it touches, and fully rebuild those periods from the raw layer.
This requires that you keep every extract in an immutable raw layer, which you should be doing anyway. The rebuild is cheap because it is usually one or two periods, and it is correct by construction: whatever arrived late is included, whatever was superseded is replaced.
Fix Two: Merge on the Business Key, With Overlap
Where full period rebuilds are too expensive, merge on the real business key rather than appending. Combined with an overlapping watermark, rerunning a window never double-counts, because a repeated row updates in place.
The requirement here is a genuine business key. A surrogate generated at load time will not do, and neither will a whole-row hash, because a legitimately amended record has a different hash but the same identity.
How to Tell Whether You Already Have This Problem
Run this check for a closed period that should no longer move:
- Take a period closed three months ago.
- Compare the total in your reporting layer against the same figure queried directly from the source today.
- If they differ, the difference is almost always late-arriving rows that your pipeline never went back for.
Repeat it for the twelve closed periods before that. A clean pipeline shows zero variance across all of them. A pipeline with this defect shows small differences clustered in the months with the most adjustments.
What Good Looks Like
The underlying principle is that a load should be defined by what the data says, not by when the job happened to run. Concretely:
- Every extract retained immutably, so any period can be rebuilt without asking the source again.
- Loads idempotent, so rerunning a window is always safe.
- Watermarks overlapping rather than abutting.
- Reconciliation counts produced automatically for closed periods, not on request.
Get those four right and this class of problem disappears, along with several others that look unrelated.