MAPPING_(FILENAME) Match
Resolve known variants of the same value using a user-supplied lookup file - nicknames, abbreviations, aliases, and company name variants.
What MAPPING_(FileName) does
MAPPING resolves variants of the same value using a lookup file you provide. Use it when records contain the same entity referred to by different names - nicknames like "Jon" and "Jonathan", company abbreviations like "IBM" and "International Business Machines", or country codes like "US" and "United States" - that you want Zingg to treat as equivalent.
The mapping file lists groups of equivalent values. MAPPING is typically combined with another match type using a comma-separated combination in the matchType string, e.g., MAPPING_nicknames,FUZZY.
How the algorithm works
MAPPING_(FILENAME) runs as a standardization step before Zingg scores similarity, but it isn't a similarity scorer itself.
Dictionary loading - Zingg reads the referenced lookup file, which groups equivalent values together (e.g., nicknames, abbreviations, codes). Each group represents synonyms for one real-world value.
Representative value selection - within each group, Zingg picks the longest value as the representative form. Every other member of the group is treated as an alias for it.
Value substitution - each field value is checked against the dictionary, case-insensitively. A match gets replaced with its representative form; no match means the original value passes through untouched.
Similarity scoring - the standardized values are then handed to whichever other match type is configured on the field - eg.
FUZZY. That's where the real comparison happens.
What MAPPING_(FileName) matches and what it does not
Jon
Jonathan
Match - both normalize to the same representative value
Match
Bob
Robert
Match - both normalize to the same representative value
Match
Jon
Jhon
No match - "Jhon" isn't in the mapping, so it's compared as-is against "Jonathan"
Match - caught by FUZZY's tolerance for the misspelling
Jon
John
No match - neither "John" nor the mapped "Jonathan" are equal strings
Match - FUZZY's similarity scoring treats them as close enough, even though they're not listed as synonyms
Robert
William
No match - normalize to different representative values
No match - FUZZY also finds them too dissimilar
Jon
[null]
No match - nothing to compare against
No match - combine with NULL_OR_BLANK to handle explicitly
Example mapping file
The mapping file is a JSON array where each element is an array of equivalent values. Each inner array is one equivalence group. The longest value in a group becomes its representative form - so "Jon" normalizes to "Jonathan", and "Bob"/"Rob"/"Bobby" all normalize to "Robert". This is the exact dictionary used to produce the table above. "Jhon" and "John" aren't listed anywhere, so MAPPING leaves them untouched, and only FUZZY can catch them.
When to use MAPPING
When not to use MAPPING
Last updated
Was this helpful?