Concepts / Data Quality and Cleaning in Large Archives

Data Quality and Cleaning in Large Archives

The central idea is transformation rather than deletion: an original address remains in the archive, while processing can treat it as equivalent to a chosen canonical address.

  • Programming

Why Identity Fragments

A large email archive may contain several addresses for the same person. Email addresses and domain names change as people move between organizations. If each address is treated as a separate identity, the archive can represent one contributor as several unrelated contributors. Mapping rules provide a way to consolidate those variants into canonical forms during processing.

Key point

The central idea is transformation rather than deletion: an original address remains in the archive, while processing can treat it as equivalent to a chosen canonical address.

Consolidating Individual Addresses

The Mapping table in mapping.sqlite stores individual email mappings in source-to-destination form. The source is the address that appears in the archive, and the destination is the canonical address that the processing system should use instead. When gmodel.py encounters an address, it checks the Mapping table. If a mapping exists, it uses the destination address. If no mapping exists, it uses the address as-is.

Northwesternaddresssource addressMapping tablesource to destination rulesswgithen@mtu.educanonical destinationCambridge addresssource addresssource entrysource entrydestination
How do several historical email addresses map to a single canonical address in the Mapping table?

Building a Career History

Worked example

Steve Githens and Three Addresses

Consolidate Steve Githens' three email addresses into the most recent address, swgithen@mtu.edu.

  1. 1
    Choose the destination

    Use swgithen@mtu.edu as the canonical destination because it is Steve Githens' most recent address.

  2. 2
    Add the first source mapping

    Create a Mapping entry from the Northwestern address to swgithen@mtu.edu.

  3. 3
    Add the second source mapping

    Create a Mapping entry from the Cambridge address to swgithen@mtu.edu.

  4. 4
    Leave the canonical address unmapped

    Do not add a third entry from swgithen@mtu.edu to itself. It is already the final form.

Result

Two Mapping entries consolidate the three addresses. Whenever gmodel.py encounters either the Northwestern address or the Cambridge address, it uses swgithen@mtu.edu instead. The canonical address is used as-is.

Northwesternaddressearlier addressTwo Mapping entrieshistorical sources point toone destinationCambridge addresslater addressswgithen@mtu.edumost recent canonicaladdressmaps tomaps tocanonical destination
What happens as a person moves between organizations and each historical address is added to the mapping system?
Key point

For three known addresses, two entries are sufficient when one address is selected as canonical. The mapping count is based on the noncanonical addresses, not on the total number of addresses.

Normalizing Domains First

The DNSMapping table works at the domain level rather than the individual address level. For an address such as someone@iupui.edu, gmodel.py first checks whether iupui.edu has a DNS mapping. If the table maps iupui.edu to indiana.edu, the address becomes someone@indiana.edu. Individual email address mappings are checked after this domain transformation.

iupui.edusource domainDNSMappingdomain-level ruleindiana.educanonical DNS entrysomeone@indiana.eduaddress after domainmappingchecked firstmaps toreplaces domain
How do several domain-name variants connect to a single canonical DNS entry in the DNSMapping table?
Mappingindividual email addressesCanonical addressdestination for anindividual addressDNSMappingdomain namesCanonical DNS entrydestination for a domainconsolidates addressesconsolidates domains
What is the difference between consolidating individual email addresses and consolidating the domain names associated with them?

Following One Archive Record

Email messageoriginal archive recordExtract addressessender and recipientsCheck DNSMappingdomain-level checkCheck Mappingindividual-address checkNormalized addressdestination or originaladdressOriginal archiveunchanged source datareadeach addressafter domain stepmapped or as-isremains unchanged
How does an inconsistent archive address pass through DNS and email mappings to become a normalized record?

When gmodel.py processes the archive, it reads each message and extracts sender and recipient addresses. It checks DNSMapping first, then checks the individual-address Mapping table. If a relevant rule exists at either stage, the destination is used. If no rule exists, the current address continues unchanged. This process is repeated for every email in the archive, so one mapping entry can affect thousands of messages when the associated person was a prolific contributor.

Protecting the Original Archive

Email and DNS mappings are applied during data processing, not during data collection or storage. They act as a transformation layer, so the original email archive remains unchanged. If a mapping later proves incorrect, it can be modified or removed without changing the archived source data. This makes it possible to test different mapping strategies while preserving the original records.

Original emailarchivesource recordsOriginal emailarchivestill preservedMapping rulestransformation layerProcessed viewcanonical addressespreservedtransforms during processing
What changes during processing, and what remains preserved in the original archive?
Best practice

Treat mappings as adjustable rules for analysis, not as replacements for the underlying archive. Preserve the original data and revise the transformation rules when your understanding of an identity or domain changes.

Mistakes in Archive Cleaning

  • Common mistake

    Adding a self-mapping for the canonical address

    What it looks like

    Adding a third entry from swgithen@mtu.edu to swgithen@mtu.edu

    Why it fails

    The canonical address is already in its final form and does not need a mapping entry.

    Do this instead

    Map only the two noncanonical addresses to swgithen@mtu.edu.

  • Common mistake

    Using DNSMapping for an individual address change

    What it looks like

    Trying to use a domain-level rule to represent the change from one complete email address to another

    Why it fails

    DNSMapping operates on domain names, while the Mapping table stores individual email address mappings.

    Do this instead

    Use the Mapping table for individual address variants and DNSMapping for domain variants.

  • Common mistake

    Checking individual address mappings before DNS mappings

    What it looks like

    Applying the Mapping table before transforming iupui.edu to indiana.edu

    Why it fails

    The documented processing order places the DNSMapping check before the individual email address check.

    Do this instead

    Process the domain-level mapping first, then apply the individual address mapping.

  • Common mistake

    Editing the original archive to normalize addresses

    What it looks like

    Replacing archived addresses directly instead of adding processing rules

    Why it fails

    Mappings are designed as non-destructive transformation rules and are applied during processing.

    Do this instead

    Keep the original archive unchanged and adjust the Mapping or DNSMapping rules.

  • Common mistake

    Assuming that an unmapped address is discarded

    What it looks like

    Treating an address with no mapping entry as missing from the processed data

    Why it fails

    If no mapping exists, gmodel.py uses the address as-is.

    Do this instead

    Distinguish between an address that has no mapping and an address that has been mapped to a canonical destination.

Practice the Mapping Decisions

MEDIUM

A contributor appears in an archive under three addresses, and you choose the most recent address as the canonical destination. Decide how many Mapping entries are needed, which addresses should be sources, and whether the canonical address needs an entry. Then explain whether a domain change should be handled in Mapping or DNSMapping.

Hints
  • Count the noncanonical addresses rather than counting all addresses.
  • A Mapping entry points from a source address to a destination address.
  • Use DNSMapping when the transformation concerns a domain name rather than one complete email address.

What do you think happens?

If gmodel.py encounters an address with no entry in the Mapping table, what happens to that address?

  • It is discarded

  • It is changed to the most recent address automatically

  • It is used as-is

  • It is changed using DNSMapping regardless of its domain

Reveal answer
Answer:

It is used as-is.

The processing rule checks for a mapping entry. When no mapping exists, the address remains as encountered.

Unified Archive View

  1. 1
    The Mapping table consolidates individual email address variants by sending source addresses to a canonical destination.
  2. 2
    When three addresses belong to one person and one is canonical, two Mapping entries are sufficient; the canonical address does not map to itself.
  3. 3
    DNSMapping consolidates domain names and is applied before individual email address mappings.
  4. 4
    Mappings are non-destructive processing rules: the original archive remains unchanged and the rules can be revised or removed.
  5. 5
    Email and DNS mappings work together to create a unified view of contributors across organizational and career changes.

Key Takeaways

  • Use the Mapping table for individual email address changes and DNSMapping for domain changes.
  • Choose one canonical destination and map each noncanonical source address to it.
  • Apply DNS mappings before individual email mappings when processing archive records.
  • Keep the original archive unchanged because mappings form a reversible transformation layer.
  • A small number of carefully chosen mappings can normalize many archive messages.

Related concepts

More concepts starting with D