Custom Mapping: Lookup Tables2019-07-31 11:14:00
Custom Mapping Features UnitySync
This functionality allows you to provide values for string replacement on attribute mapping. When you create a lookup table, the lookup.txt file will be created in …\UnitySync-v2.x\connections\YourConnectionName\.
Your lookup table entries should be in this format:
Source Value|Replacement Value
Wild cards * (string) and ? (character) are accepted.
To utilize the Lookup table, you must use Custom Object Mapping. The mapping for an attribute that uses the lookup table should be in this format:
Enclosing the Source Attribute variable in ? indicates that lookup will occur. All lookup entries are tested against all lookup mappings.
In this example lookup table, we are ensuring the consistency of Destination values for Company and Department attributes.
Example Lookup Table:
Example mapping to replace values based on the lookup table:
- Source objects with a Company/Dept value of “DirWiz” will sync to the Destination with a value of “Directory Wizards”
- Source objects with a Company/Department value of “Dept1001” will sync to the Destination with a value of “Sales”.
- Source objects with a Company/Department value starting with “Dept2” will sync to the Destination with a value of “Administration”.
- Source objects with a Company/Department containing “VIP” will sync to the Destination with a value of “VIP Offices”.
If no match is found by Lookup, then the original Source value will be synced to the Destination. So, in this example, if the Source data already includes Directory Wizards for the Company value, it will be synced as is. Note, however, that any other version of the Company name, for example Dir Wizards, will also be synced as is because we have not included this potential value in the lookup table. Thankfully, if you notice this happening, it is easy to simply add another line to the lookup table to account for this and it will be corrected on your next sync.
Another good example of a lookup table is the Country to Country Code Lookup Table.