Match & Map

This guide explains how to use the Match & Map enrichment to add new values to your data extract using existing values.

Introduction

Use the Match & Map enrichment to find certain values in your data extract (this is known as matching) and create new values based on these matched values (this is known as mapping). Use the Match & Map enrichment to add descriptions to acronyms or assign values to dimensions. For example, use the Match & Map enrichment to achieve the following:

  • Find certain values in your data. For example, an acronym like bis.

  • Map target values on to the values you have found. For example, map the target value Back in stock on to the value bis.

  • Create a new column that contains the mapped values. For example, the row which contained the matched value bis will then also contain a new column with the mapped value Back in stock.

When configuring the enrichment, you can provide a lookup table (this contains a set of the values to match and the corresponding target values to map). This enrichment is a more user-friendly version of the map custom script.

Prerequisites

Before you complete the procedure in this guide, perform all of the following actions:

  • Make sure that the data extract fetched from the datastream contains the dimension you want to match and map.

Configuring the Match & Map enrichment

This guide explains how to configure the Create or Edit Columnsenrichment. Before completing this step, start creating an enrichment by following the instructions in Using standard enrichments. To configure this enrichment, follow these steps:

  1. In the Define the columns to work with section, fill in the following fields:

    Original column

    In the drop down menu, select the column that contains the values to match.

    If the drop down field does not contain the column with the values to match, make sure you have applied the correct Data Mapping to your datastream.

    New column

    Enter the name of the new column to be added to the data extract. This new column is populated with the mapped values.

  2. In the bottom-right corner of this section, click Apply.

  3. In the Do you have a lookup table to import? section, choose one of the following options:

    • To add new match and map values to the enrichment, select No, I need a new lookup table and continue from step 4 of this guide.

    • To use an existing lookup table to configure the enrichment, select Yes, I have a lookup table and follow these steps:

      1. In the pop-up dialog, to upload a lookup table, click to upload your lookup table.

      2. (Optional) To enter the values without uploading a file, click the Paste values from external file tab and enter the values to match and map in this format value_to_match,value_to_map.

        Make sure you do not include the header of the file when uploading the lookup table or when pasting the values into the Paste values field.

      3. Click Apply.

      4. In the Lookup table section, click Apply.

      5. Continue from step 6 of this guide.

  4. If you are entering new match and map values, in the Lookup table section of the enrichment configuration, configure the following settings:

    WHEN

    In each row, enter a value to match.

    (Optional) Click Autofill values to automatically populate the WHEN column fields with all unique values in the original column you selected, based on the latest data extract.

    Exactly matches (and other options)

    In the drop-down menu above the values in the WHEN column, choose how to match the data. By default, the option Exactly matches is chosen - this means that the values entered in the WHEN column must be identical to the values in the data extract. For more information on the other match options, see Match options.

    THEN

    In each row, enter the target value to map. The values entered here are used to populate the new column of the data extract.

    To add a new row to the lookup table, click to the right of a row.

  5. Click Apply.

  6. In the When Adverity detects new values in the datastream section, choose one of the following options:

    Leave the table unchanged

    If Adverity finds a value in the original column that is not in the WHEN column, then the corresponding row in the new column in the data extract is left blank.

    Add new values

    If Adverity finds a value in the original column that is not in the WHEN column, this value is added to the corresponding row in the new column in the data extract.

    Add new values and notify me

    If Adverity finds a value in the original column that is not in the WHEN column, this value is added to the corresponding row in the new column in the data extract and a notification email is sent out to inform the recipient that a new value has been found. You can control who receives the notification emails through the subscriptions set up in the administration section. For more information, see Managing user notifications.

To preview your enrichment at this step, click the Table preview tab. Here, you can see how your current enrichment instructions will transform the data you have previously collected using this datastream.

If the preview shows that the enrichment is not working in the way you want it to, click the Instructions tab to adjust the enrichment settings.

Repeat these steps until the preview shows that the enrichment will have the effect you want.

For more information about the preview, see Previewing enrichments.

Match options

If you are entering new match and map values, in the Lookup table section, you can determine how the values are matched.

By default, the option Exactly matches is chosen. The match options are as follows:

Exactly matches

The values entered in this field must exactly match the values in the selected original column. This search is case sensitive.

For example, if you select this option and enter Squirtle, Adverity will only match the value Squirtle in the original column.

Exactly matches - Case insensitive

The values entered in this field must exactly match the values in the selected original column. This search is not case sensitive.

For example, if you select this option and enter Bulbasaur, Adverity will match Bulbasaur or bulbasaur in the original column.

Contains

Find values in the original column that contain the values entered in this field. For example, use this match type to search for the name of Campaigns that contain a certain keyword. This search is case-sensitive.

For example, if you select this option and enter Char, Adverity will match Charmander and Charmeleon in the original column, but not charizard.

Contains - Case insensitive

Find values in the original column that contain the values entered in this field. For example, use this match type to search for the name of Campaigns that contain a certain keyword. This search is not case-sensitive.

For example, if you select this option and enter pi, Adverity will match Pikachu and pichu in the original column.

Regex

Find values in the original column using a regular expression.

Video guide: How to use the Match & Map enrichment

This video guide explains how to create and configure a Match & Map enrichment.