Skip to content

Privacy and preparation

How to reconcile a dataset refresh against its source records

By SourceX Editorial · Updated

10 sections

Short answer

To reconcile a dataset refresh against its source records, recount each period in the source as it stands now, subtract every documented exclusion and confirm the result equals the new release. Then bridge from the previous release for the same period with coded changes, such as late arrivals, deletions, new exclusions and scope withdrawals, until the residual is zero, and notify earlier recipients of any record they hold that changed.

Redaction

Dataset refresh source

This page covers how to reconcile a dataset refresh against its source records.Illustrative

Key takeaways

  • Reconcile a refresh per period: source count now, minus documented exclusions, must equal what the release contains.
  • Bridge each period from the prior release with coded changes until the residual is exactly zero.
  • Deletions and edited extraction queries are the changes most often missed, so detect both explicitly.
  • Recompute exclusions from the snapshot every time and apply new withdrawals to every period, not only the newest.
  • Any change that removes or alters a delivered record needs a notice to the recipients of earlier versions.
  • Keep the source re-readable until the next refresh is signed; default snapshot retention can be shorter than the refresh interval.

How do you reconcile a dataset refresh against its source records?

Reconcile a refresh one period at a time. For every period the release covers, count the in-scope records in the source as it stands today, subtract each documented exclusion, and check that the result equals what the new release contains. Then explain the difference from the previous release for that same period with a short list of change codes, so that the old count plus every explained change equals the new count exactly.

That second step is what makes a refresh different from a first delivery. A first delivery only has to tie to the source once. A refresh has to tie to the source again and also tie to the release it replaces, because the people who already received the earlier version need to know which of their records changed, disappeared or were added, and why.

The rest of this page gives the period volume schema that holds those numbers, the change codes that explain movement between releases, an exclusion review checklist to run on every refresh, a worked example that closes and one that fails, and the notice that goes to earlier recipients when a source change touches records they already hold.

Why can a refresh fail when the first delivery tied out?

The source keeps moving after you cut a release, so last quarter's correct count can be wrong today. In an accounts payable ledger, invoices are often posted weeks after the invoice date, so a July period gains records in August. Records entered in error get deleted, voided documents change status, duplicates are found and merged, and a vendor or customer may be removed from scope by agreement. None of that shows up if you only check that the new files arrived intact.

Deletions are the change most likely to be missed, because many exports only return rows that still exist. Some systems do expose them: Zendesk documents that its incremental ticket export includes deleted tickets in the stream by default and offers an exclude_deleted parameter to leave them out, and its incremental exports guide adds that user-provided content in deleted tickets is scrubbed 30 days after deletion, or immediately when a ticket is permanently deleted. A refresh pipeline that sets that parameter, or that only reads current rows, silently loses the evidence that a previously delivered record is gone.

The other common failure is quiet scope drift. Someone edits the extraction query between refreshes, adds a filter for one business unit or changes the date field from invoice date to posting date, and every period shifts. The counts still look plausible, which is why the schema below records a fingerprint of the query and treats any change to it as a scope event rather than an ordinary refresh.

What should the period volume schema include?

Keep one row per release, source system and period. The fields below are the minimum that let a reviewer recompute every number without opening the pipeline code. Field names are suggestions; the arithmetic between them is the part to keep.

What should the period volume schema include?
FieldWhat it recordsIllustrative valueRule it must satisfy
release_id and prior_release_idThis release and the release it replaces for the same scopeR4 and R3prior_release_id is blank only for the first release
periodThe business period the records belong to, by the date field named in scope2026-07 by invoice dateSame date field as the prior release unless a scope change is logged
source_system and source_query_hashSystem of record and a hash of the exact extraction query and parametersAP ledger, query hash a91fHash equals the prior release's hash, or scope_change_id is filled
source_snapshot_ref and snapshot_taken_atA pointer that lets someone re-read the source exactly as countedTable version 418, 2026-09-05Must still resolve on the day of review
source_countIn-scope records in the source for the period at snapshot time4,861Recomputable from the snapshot and query
excluded_count_by_reasonRecords removed before delivery, split by exclusion reason codeVoided 104, duplicate 43, withdrawn 57Every reason code exists in the exclusion register
delivered_countRecords in the release files for the period4,657Equals source_count minus total exclusions
prior_delivered_countDelivered count for the same period in the prior release4,675Copied from the prior row, never re-derived
change_linesCoded explanations of movement since the prior release, each with a record listLate posted +61, deleted -12Prior delivered plus all change lines equals delivered_count
status and reviewerPass, hold or fail, with the person who signed itPass, dataset operations ownerFail blocks release; hold needs a dated note

Which change codes explain a period's movement between releases?

Use a closed list of change codes, each backed by a list of record identifiers, so the bridge between two releases is auditable. A free-text explanation such as source updated is not a reconciliation; it is an admission that nobody checked.

Which change codes explain a period's movement between releases?
Change codeWhat happened in the sourceEffect on delivered countEvidence to attachEarlier recipients affected?
LATE_ARRIVALRecord created or posted after the prior snapshot with a date inside the periodIncreaseRecord ids with created or posted timestamps after the prior snapshotNo, they receive new records only
SOURCE_DELETERecord that was delivered no longer exists in the sourceDecreaseDeletion events or a missing-key diff against the prior snapshotYes, a withdrawal notice for those ids
STATUS_EXCLUDEDelivered record moved into an excluded status, such as voidedDecreaseStatus history showing the change dateYes, the record is withdrawn
DUPLICATE_FOUNDDelivered record identified as a duplicate of anotherDecreaseSurvivor and duplicate ids with the matching ruleYes, the duplicate is withdrawn
SCOPE_WITHDRAWALA party or category removed from the agreed scopeDecreaseThe signed scope change and the list of affected idsYes, a withdrawal notice with the reason
EXCLUSION_RELEASEDA record previously excluded becomes eligible, such as a hold liftedIncreaseRelease decision with date and approverNo, but note it in the release notes
CONTENT_CORRECTIONSame record, corrected field values, count unchangedNoneField-level diff for the affected idsYes, a correction notice listing changed fields

Which exclusion checks must pass before each refresh is signed?

Exclusions are where a refresh most often goes wrong, because an exclusion rule written for the first release can stop matching what the source now contains. Run this list before anyone signs the period rows.

  • Every exclusion reason code in this release exists in the exclusion register, with an owner and the date the rule was approved.
  • Each exclusion count is recomputed from the snapshot, not carried forward from the last release.
  • Records that were excluded last time and are now delivered each have an EXCLUSION_RELEASED line and an approver.
  • Records that were delivered last time and are now excluded each have a change line and appear in the withdrawal list for earlier recipients.
  • Withdrawals agreed since the last release (a party asking to be removed, a category taken out of scope) are applied to every period, not only the newest one.
  • Privacy holds and deletion requests received since the last snapshot are matched against delivered record ids, including records in earlier releases.
  • No exclusion reason has grown or shrunk by an unexplained amount; a reason that doubles in one period gets a written cause before release.
  • Test, sample and internal records are excluded by a rule tied to a field in the source, not by a hand-maintained id list that new records will not be on.
  • The exclusion register version used for this release is recorded in the release notes.

Worked example: one invoice period across two refreshes

This example is illustrative. The counts are invented to show the arithmetic and do not describe any real company or SourceX customer data. The source is an accounts payable ledger, the period is July 2026 by invoice date, release R3 used a snapshot taken on August 5 and release R4 used a snapshot taken on September 5.

In R3 the source held 4,812 July invoices. 96 were voided and 41 were duplicates, so 137 were excluded and 4,675 were delivered. In R4 the source holds 4,861 July invoices. Exclusions are now 104 voided, 43 duplicate and 57 from one vendor removed from scope by a signed amendment, 204 in total, so 4,657 are delivered. The new row ties to the source: 4,861 minus 204 is 4,657.

The bridge from R3 to R4 must also close, and it does:

Worked example: one invoice period across two refreshes
LineChange codeRecordsRunning delivered count
Delivered in R3Opening4,6754,675
Invoices posted in August with July invoice datesLATE_ARRIVAL+614,736
Invoices entered in error and deletedSOURCE_DELETE-124,724
Invoices voided after R3STATUS_EXCLUDE-84,716
Duplicates found after R3DUPLICATE_FOUND-24,714
Vendor removed from scope by amendmentSCOPE_WITHDRAWAL-574,657
Delivered in R4Closing, equals delivered_count4,657Bridge closes with zero residual

What does a failing period look like, and which checks catch it?

In the same illustrative R4, June 2026 shows a source count of 4,498 against 4,530 at the previous snapshot, a drop of 32, yet the delivered count is unchanged at 4,401 and there are no change lines. The bridge closes only because nothing was recorded, and the period row cannot tie to the source: 4,498 minus the unchanged 129 exclusions is 4,369, not 4,401. The cause turns out to be an edited extraction query that dropped one cost center, with a new query hash and no scope change logged. The period fails and the release is held.

At a glance

What does a failing period look like, and which checks catch it

A validator that runs before sign-off should reject that row on its own. The checks below are simple enough to write as SQL tests or a short script; dbt-utils, for example, ships an equal_rowcount test that supports grouping columns, which maps naturally onto one assertion per period.

  • Tie to source: delivered_count equals source_count minus the sum of excluded_count_by_reason, for every period.
  • Tie to prior release: prior_delivered_count plus the sum of change_lines equals delivered_count, with zero residual.
  • Scope stability: source_query_hash equals the prior release's hash, or scope_change_id points to a signed change.
  • Evidence present: every change line with a non-zero count has a record id list whose length equals the count.
  • File tie: delivered_count equals the row count read back from the release files, grouped by period.
  • Snapshot reachable: source_snapshot_ref resolves on the review date, so anyone can recompute source_count.
  • No orphan periods: every period in the prior release appears in this release, even if its count is now zero.

Which recipients and earlier versions does a source change touch?

Any change line that removes or alters a record someone already received creates a notice obligation, so keep a recipient and version log next to the period rows. For each earlier release, the log records who received it, when, under which agreement and in which format. When R4 withdraws the 79 previously delivered July records in the example (12 deleted, 8 voided, 2 duplicates and 57 out of scope), the log tells you which recipients of R1, R2 and R3 hold some of them.

The change notice itself should list the affected record identifiers, the change code, the effective date and what the recipient is expected to do, such as delete the records or replace them with the corrected version. The Datasheets for Datasets questions on maintenance ask the same things in general form: whether the dataset will be updated to correct errors or add or delete instances, how updates will be communicated, and whether older versions stay supported. A refresh process should be able to answer each of those with a record, not a promise.

Content corrections deserve the same care as withdrawals. A corrected amount or a reassigned category does not move any count, so a count-only reconciliation will never surface it; the CONTENT_CORRECTION line and its field-level diff are what tell a recipient that the record they trained or evaluated on has changed.

How long must the source stay re-readable?

A reconciliation is only as good as your ability to recount the source as it was. If the snapshot behind R3 is gone when R4 is reviewed, nobody can show which records were late arrivals and which were already there. Store a snapshot reference that will still resolve, and check its retention against your refresh interval.

Table formats with history make this practical, but defaults matter. Delta Lake documents time travel by version or timestamp for re-creating earlier outputs, and states that by default you can time travel to a table up to 30 days old, controlled by log and deleted-file retention settings, and that time travel by timestamp can break if the table directory is copied while time travel by version is unaffected. A monthly refresh sits right on that default, and a quarterly refresh exceeds it, so either extend retention or export the counted record keys with each release.

Before counting, confirm the source extract itself is current. dbt's source freshness checks exist to tell you whether source data meets the freshness you expect, and a stale extract produces exactly the kind of missing late arrivals that look like a genuine drop. Recording row counts with each pipeline run helps too: the OpenLineage output statistics facet defines a rowCount for the rows written to a dataset, which gives an independent count to compare with delivered_count.

What should a business licensing records on a refresh schedule expect to provide?

If your company licenses operational records for AI and the agreement includes refreshes, the reconciliation above is how both sides can see that each new release reflects the source and the agreed scope. The business keeps control of what changes: nothing is delivered until the company has approved scope and terms and signed, and SourceX's use, sublicensing and distribution of the de-identified dataset stay within what that agreement permits.

Rights review, contracting, preparation and delivery for each refresh are handled by SourceX, with de-identification done by SourceX through approved processing routes. Withdrawals, scope amendments and corrections between refreshes fit the same flow: they are recorded against the signed scope, not handled as informal edits.

Frequently asked questions

How often should a dataset refresh be reconciled against the source?

Reconcile every refresh before it is released, not on a separate audit cycle. The reconciliation is part of producing the release, because the bridge from the prior version is what tells earlier recipients what changed. If refreshes are frequent, automate the validator and keep human review for failing or held periods.

What tolerance is acceptable when a refresh does not tie exactly?

For record counts the target is zero unexplained difference, because every record is either delivered, excluded with a reason or explained by a change code. A tolerance only makes sense for derived measures such as totals of amounts, and then it should be written into the agreement in advance. An unexplained count difference of any size is a finding, not noise.

Should a refresh re-deliver whole periods or only the changes?

Either works if the period rows and change lines are kept. A full snapshot per period is simpler for recipients to load, while a change-only delivery is smaller but depends on recipients applying deletions correctly. Whatever the mode, the reconciliation still runs on full period counts so a missed delete cannot hide.

How is refresh reconciliation different from data lineage?

Lineage records how data moved through jobs and which outputs came from which inputs. Refresh reconciliation is a count and explanation check per period between two releases and the source. Lineage events can supply inputs to it, such as row counts per run, but they do not by themselves show that a delivered record disappeared from the source.

What if the source system cannot report deleted records?

Diff the record keys in the new snapshot against the keys in the prior snapshot for each period; any key that is missing is a candidate SOURCE_DELETE. That requires keeping the prior keys, which is another reason to store a reachable snapshot or a key list with each release. Confirm a sample of the missing keys in the source before issuing a withdrawal notice.

Sources

  • Zendesk's incremental exports reference says deleted tickets appear in the ticket stream by default and can be excluded with the exclude_deleted parameter. Source
  • The dbt-utils package documents an equal_rowcount test that asserts two relations have the same number of rows and supports grouping columns. Source
  • Datasheets for Datasets asks maintainers whether a dataset will be updated to correct errors or add or delete instances, how updates are communicated, and whether older versions remain supported. Source
  • Delta Lake documents time travel to older table snapshots by version or timestamp, a default window of up to 30 days, and that timestamp-based time travel can break if the table directory is copied. Source
  • dbt documents source freshness checks as a way to determine whether source data freshness meets the expected service level. Source
  • The OpenLineage output statistics facet defines rowCount as the number of rows written to a dataset, alongside size and fileCount. Source
  • Zendesk's incremental exports guide says user-provided information in deleted tickets is scrubbed 30 days after deletion, or immediately when tickets are permanently deleted. Source

See if your company qualifies

A short company assessment. No data uploads are needed.

See if your company qualifies