Home /  Mappings /  How to / 

Use wildcards in Lookup Tables

If you receive data which contains a certain string but has a range of available prefixes or suffixes, and you need to map it to a reduced set of target values, you can use Lookup Tables and wildcards for matching multiple possible input options at once.

To get started, navigate to your mapping via the Mappings dashboard, open the dropdown menu in the "Target" section of the interface and choose "Add a lookup table" menu item (or choose a previously saved Lookup Table for editing):

Screenshot showing where the Duplicate menu item can be found

Then, define your lookup table, provide it with a name, and replace the interchangeable part of the key you want to match against with the * symbol (or any other sequence of symbols, you will be able to select what to match against during the $lookupTable function call). Note, that you can replace multiple parts of your key with *:

Screenshot showing where the Duplicate menu item can be found

Once you're satisfied with the result, click "Confirm", and open Transformation editor for the target key where you'd like to apply the Lookup Table. You can notice, that any input value that matches the loosely defined wildcard-based Lookup Table value is matched now, when the { "wildcard": "*" } is passed as an optional parameter to the $lookupTable function:

Screenshot showing where the Duplicate menu item can be found