Automatically populate a value table

This guide explains how to create a transformation script that will automatically populate a value table with data from a data extract.

Introduction

Use value tables to achieve the following goals:

  • Store a set of target values to be used in a mapping table.

  • Reference request URLs during bulk requests to Web Connect. For more information, see Collecting data using Web Connect.

  • Manage input values (for example keywords) when configuring certain connectors.

Value tables are useful when defining certain values and prevent inconsistencies within your data.

Use a transformation script to update a value table with the latest data from a data extract.

Prerequisites

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

  • Find the name of the columns in the data extract that contain the data used to populate the value table.

Procedure

To create a transformation script that automatically populates a value table with data from a datastream, follow these steps:

  1. Go to the Transformations page.

  1. In the top right corner, click + Create transformation.

  2. Click Custom Script.

  3. To assign the transformation to individual datastreams of your choice, follow these steps:

    1. In the Assign to section, select Individual datastreams.

    2. In the drop-down menu, select the datastreams to assign the transformation to them.

  4. To assign the transformation to all existing and new datastreams that belong to Datastream Types of your choice, follow these steps:

    1. In the Assign to section, select Datastreams Types.

    2. In the drop-down menu, select the Datastream Types to assign the transformation to all datastreams that belong to these types.

    3. (Optional) In the Do not assign to these individual datastreams drop-down menu, select the individual datastreams that belong to the Datastream Types that you have selected, but you do not want to assign the transformation to them.

  1. Click Next.

  1. In Select Instruction, enter and select collect.

  2. In Column, select String in the drop-down field and enter the name of the source field used to populate the VALUE column of the value table.

  3. In Table, enter the name of the value table to be populated.

  4. (Optional) Select the Flush checkbox to delete all previous entries in the value table each time the transformation script is run. This step ensures the value table is populated with only the latest data.

  1. Click Next.

  1. (Optional) In Transformation name, rename the transformation.

  2. Click Create +.

As a result, the transformation script is created and can be applied to the relevant datastream to update the value table. For more information on how to apply a transformation script, see Applying a mapping transformation to a datastream.