Skip to content

Privacy and preparation

Dataset persistent record identifiers: keeping IDs stable through redaction

By SourceX Editorial · Updated

10 sections

Short answer

Keep record identifiers stable by separating identity from content and location. Mint an opaque record ID once, never derive it from fields redaction can change, and carry it through every redaction, split, merge, format change and new release. Let redaction change only a content hash, retire withdrawn IDs with a tombstone, and ship a lineage ledger so buyers can verify every change.

Redaction

Dataset persistent record

This page covers dataset persistent record identifiers: keeping IDs stable through redaction.Illustrative

Key takeaways

  • Treat record identity, content version and file location as three separate things; redaction may change only the second and repackaging only the third.
  • Never compute a record ID from content or from any field that redaction can mask.
  • Retire withdrawn IDs with a coded tombstone and never reuse them.
  • Splits and merges need explicit parent, survivor and alias links, or joins silently break.
  • Table-format row IDs help inside a pipeline but do not follow records into exports, redaction tools or training chunks.
  • Persistent IDs increase linkage risk, so scope them to one licensing relationship.

How do you keep record identifiers stable through redaction and repackaging?

Separate three things that most pipelines blur into one column: the record's identity, the content version of what was delivered and the physical place it sits in a file. Mint the identity once, never derive it from anything redaction can touch, and carry it unchanged through every transformation. Let redaction change only the content version, let repackaging change only the location, and write each change to a lineage ledger.

That split answers the hard cases. A masked email address changes the content hash but not the record ID. A conversion from CSV to Parquet, a reshard or a compaction changes file names and row positions but not the record ID. A record that is withdrawn leaves a tombstone with its ID and a reason code, so the buyer can tell a removal from a lost row.

The companion page on stable record IDs and join keys covers how to construct keys and pseudonymous join keys in the first place. This page is about what happens to those IDs afterward, when the same records are redacted, split, merged, dropped, reformatted and re-delivered.

Why redaction is where most record IDs quietly change

Redaction changes content, and many identifiers are quietly computed from content. A row hash, a hash of the message body or a key built from a subject line all change the moment a name is masked, so the redacted record arrives looking like a new record and the original looks deleted.

Free-text redaction also moves character positions. Microsoft Presidio's anonymizer, for example, applies operators such as replace, mask, redact, hash and encrypt to detected entities and reports each result with start and end offsets. Replacing a name with a shorter or longer token shifts every later offset, so any span label, citation or annotation keyed to positions in the original text no longer points at the right characters. Presidio's hash operator also shows how easily a derived value drifts: its documentation says a random salt is generated per entity unless a consistent salt is provided, so the same name hashes differently from one run to the next.

Structure changes too. Removing a quoted reply can split one stored email into two messages; deduplication can merge two tickets into one; a suppression request removes a record entirely. Each needs an explicit rule, or downstream joins, evaluation splits and deletion requests stop matching.

The identifier stability and privacy design guide, event by event

Use the table as the identifier section of a data contract. Each row is a transformation the records may go through; the identity rule says what must stay fixed, and the last column says what the lineage ledger must record so a buyer can verify it.

The identifier stability and privacy design guide, event by event
TransformationIdentity ruleWhat may changeLedger entry
Field masking or removalrecord_id unchangedcontent_version and the masked fieldsevent redact_field, field names, method code, tool version
Span redaction in free textrecord_id unchanged; span IDs re-anchoredText, offsets, content_versionevent redact_span, count of spans, offset map or re-anchored span IDs
Record withdrawn or suppressedrecord_id retired, never reusedRecord removed from payloadevent suppress, reason code only, no content
One record split into severalParent keeps its ID; children get new IDsNew child recordsevent split, parent_record_id on every child
Duplicates mergedSurvivor keeps its ID; others become aliasesAlias records removedevent merge, survivor_id and alias_ids
ID derived from redacted dataRe-key with a new opaque IDrecord_id itselfevent rekey; crosswalk shipped only if the contract allows linkage
Format conversionrecord_id unchangedFile type and row orderevent repackage, source and target format, manifest hash
Reshard, compaction or re-chunkingrecord_id unchanged; chunk IDs reference itFile names, positions, chunk boundariesevent repackage, chunking rule and version
New delivery versionCarried-over records keep IDsdelivery_version, content_version where editedevent release, counts added, changed, suppressed

Which ID constructions survive, and which only look stable

Prefer an opaque identifier that is minted once and stored, over one that is recomputed from source values. A recomputed ID is only as stable as every input and every normalization rule, and redaction is designed to change inputs.

Python's uuid module, which follows RFC 9562, illustrates the options. uuid4 generates a random value and uuid7 a time-ordered one, both suitable for minting once and storing in a registry. uuid5 is name-based: RFC 9562 requires that the same namespace and the same canonical name always produce the same UUID, which is useful for recomputing, but it is an unkeyed SHA-1 hash, so wrapping a personal value in it lets anyone with a candidate list recompute it.

Which ID constructions survive, and which only look stable
ConstructionSurvives redaction?Survives repackaging?Privacy note
Random or time-ordered ID minted once, stored in a registryYesYesReveals nothing by itself; the registry must stay with the supplier
Name-based UUIDv5 over a non-personal source keyYes, if the source key is not redactedYesUnkeyed and recomputable; never wrap emails, phones or account numbers
Keyed hash of a source keyYes, if the source key is not redactedYesSecret stays with the supplier; covered on the stable record IDs page
Hash of the full row or message bodyNo: changes on every editYesUse as content_version, never as identity
Row number, file offset or default table row positionNoNo: changes on re-sort or compactionUseful only inside one file version
Raw source-system key (ticket number, CRM ID)Often removed by redactionYesCan expose system details or appear inside text that gets redacted

What table formats preserve for you, and where they stop

Open table formats can track row identity, but only inside one table and only under certain write paths. Treat them as helpers for the supplier's pipeline, not as the delivered identifier.

The Delta Lake protocol gives every row a fresh Row ID, which can change on any update even for unmodified rows, and a stable Row ID, which is preserved when a row is updated or copied once row tracking is enabled. Its default generated IDs are the file's base Row ID plus the row's position, and the protocol notes they are reassigned when a row moves to another file, for instance during compaction.

Apache Iceberg's v3 row lineage assigns a _row_id and a _last_updated_sequence_number, and requires writers to copy an existing _row_id when a row moves to a different data file. The spec also states the limit: rows updated through equality deletes lose lineage and are treated as a removal plus a brand-new row. Neither mechanism follows a record when it is exported to JSONL, split into training chunks or redacted in a separate tool, so the delivered record_id still has to be an explicit column.

The lineage ledger that travels with each delivery

Ship the ledger as its own file in every delivery, keyed by record_id, with one row per event. Declare the key in the dataset's metadata as well: the Croissant format lets a RecordSet name one or more fields whose values are unique across records as its key, and lets a field reference another RecordSet's field as the equivalent of a foreign key.

At a glance

The lineage ledger that travels with each delivery

Keep the ledger free of the content it describes. A suppression event says that a record left and why, in a coded reason, not what it contained.

  • record_id: the persistent identity, opaque, never reused after retirement.
  • content_version: a hash of the delivered payload for that record in this delivery.
  • event_type: one of first_seen, redact_field, redact_span, split, merge, suppress, rekey, repackage or release.
  • parent_record_id, survivor_id and alias_ids: filled for split and merge events.
  • reason_code: a short code from a published list, for example privacy_request, out_of_scope or duplicate.
  • method_ref: the redaction or packaging method identifier and tool version, so the change can be reproduced.
  • delivery_version and event_time: when and in which release the event took effect.

Can a buyer validate and rebuild the package without the supplier's systems?

Yes, if the package carries the key declaration, the ledger and content hashes, the buyer can check every identity rule without any access to the supplier's systems. These checks run on the delivered files alone and are the acceptance test worth writing into the contract.

When a check fails, hold the delivery out of training storage and send the supplier the failing IDs and the rule they broke, not a general complaint. Most failures trace to one pipeline step, such as a redaction tool that rewrote a key column or an export that regenerated IDs, and the fix is usually a re-run of that step. Keep the failed delivery and its check output, since the next delivery's carry-over test depends on knowing which version was accepted.

  • Uniqueness: record_id is unique within each delivery and never reappears after a suppress event.
  • Carry-over: every record_id from the previous delivery is either present again or has a suppress, merge or rekey event in this one.
  • Content consistency: recomputing the hash of each record's payload matches content_version, and any change in content_version has a redaction or edit event.
  • Lineage closure: every parent_record_id and survivor_id exists in the current or a previous delivery.
  • Span integrity: every span or chunk ID points to offsets that fall inside the current redacted text.
  • Leak scan: no record_id equals, contains or encodes a value that appears in a redacted field, and no ID string appears inside the text payload.
  • Rebuild: applying the ledger events in order to the previous delivery's ID set reproduces the current ID set exactly.

Illustrative: a support ticket set from version one to version two

The counts below are illustrative and invented to show the arithmetic, not taken from any dataset. Version one of a support ticket set holds 1,000 ticket records. Before version two, three things happen: a requester asks for removal, eight long email threads are split into individual messages and a deduplication pass finds duplicate tickets.

In version two, 6 records carry suppress events with reason code privacy_request; 8 parent tickets keep their IDs and gain 21 child message records, each with parent_record_id set; 4 duplicates are merged into survivors, producing 4 merge events listing alias_ids. Every other record keeps its ID, and 140 of them show a new content_version because a second redaction pass masked phone numbers in their text.

A buyer's rebuild check starts from 1,000 IDs, removes 6 suppressed and 4 aliases, and adds 21 children, giving 1,011 records, which must equal the delivered count. The exception that would fail this check is a record whose only identifier was the requester's email address: after redaction it must be re-keyed, and the ledger has to say so.

When to break stability on purpose, and how persistence raises linkage risk

Persistence is useful for joins and corrections, and it is also what makes linkage possible. NIST's report on de-identifying personal information notes that pseudonymization lets information about one person be linked across records, and that using a consistent pseudonym across multiple datasets can make re-identification through a linkage attack easier.

Break stability deliberately in three situations. When the ID was derived from data that redaction removed, re-key it. When a buyer holds two separately licensed releases that must not be joined, mint new IDs for the second and ship no crosswalk. When a supplier licenses the same records to two parties, use different identifiers per relationship so the copies cannot be combined.

Escalate to a privacy specialist before relying on persistent IDs when records describe individuals over long periods, when the ID scheme spans several source systems or when a regulator's guidance on pseudonymised data applies to the dataset. Having access to the records, having privacy permission to process them, owning the business records and holding a contractual right to license them are separate questions, and an opaque ID answers none of them.

Writing identifier rules into a data request

Buyers who need multi-release operational data can put the identity rules above into the request itself: the events the records will go through, the ledger fields and the acceptance checks. That makes stability a stated requirement rather than a hope.

When SourceX handles such a request, it looks for U.S. businesses that hold the records instead of selling a stocked dataset, and the request form is where a buyer spells out scope, volume, language, format, timing and licensing needs, including identifier rules like these. No record moves until the business holding it has approved the scope and terms and signed.

Frequently asked questions

Should redaction change a record's ID?

No, in almost every case. Redaction changes the content, so it should change a content version or hash, while the record ID stays fixed. The exception is an ID derived from the redacted value itself, which must be replaced and logged as a re-key.

What is the difference between a record ID and a content hash?

A record ID names the record across its whole life; a content hash fingerprints what was delivered at one point. Keep both: the ID for joins and deletions, the hash to detect and verify changes between deliveries.

Do Delta Lake or Iceberg row IDs solve this for a delivered dataset?

Only partly. Both can preserve a row's identity inside one table under certain write paths, but neither follows a record once it is exported, redacted in another tool or chunked for training. Use them in the pipeline and still deliver an explicit record_id column.

How should a buyer handle a record that disappears between deliveries?

Look for its ID in the lineage ledger. A suppress, merge or re-key event explains it; a missing ID with no event is a defect to raise with the supplier. Remove suppressed records from training stores using the ID.

Can stable IDs make a de-identified dataset riskier?

They can, because a persistent pseudonym links many records about the same entity and can help an attacker match them to outside data. Scope IDs to one licensing relationship, keep any mapping table with the supplier and review long-lived IDs with a privacy specialist.

Sources

  • The Delta Lake protocol distinguishes fresh Row IDs, which can change on any update, from stable Row IDs preserved through updates and copies when row tracking is enabled; default generated IDs are reassigned when rows move files, such as during compaction. Source
  • Apache Iceberg v3 row lineage requires writers to copy an existing _row_id when a row moves to another data file, and treats rows updated through equality deletes as removed and re-added. Source
  • The Croissant specification lets a RecordSet declare a key of one or more fields unique across records, and lets fields reference another RecordSet like a foreign key. Source
  • Microsoft Presidio's anonymizer replaces detected entities with operators such as replace, mask, redact, hash and encrypt, returns results with start and end offsets, and salts hashes randomly per entity unless a consistent salt is set. Source
  • Python's uuid module generates random uuid4, SHA-1 name-based uuid5 and time-based uuid7 identifiers following RFC 9562. Source
  • RFC 9562 requires name-based UUIDs generated from the same name and namespace in the same canonical format to be equal, and computes UUIDv5 with SHA-1. Source
  • NIST IR 8053 explains that pseudonymization allows linking an individual's information across records and that consistent pseudonyms across datasets can make linkage attacks easier. Source

Tell us what data you need

Share scope, volume, format, timing and licensing needs. Datasets are sourced on request.

See if your company qualifies