Configuring advanced Schema Mapping

This guide explains how to configure advanced Schema Mapping for your Datastreams.

Introduction

Apply Schema Mapping to a Datastream to map source fields to target fields that conform to Adverity’s unified naming and formatting conventions.

This guide explains how to configure advanced Schema Mapping for your Datastreams. For more information on configuring basic Schema Mapping, see Harmonizing data.

Changes to the Schema Mapping may change the table structure of the Data Extracts. The changed table structure may disrupt the data structure in your Destinations.

Changes to the Schema Mapping only affect future Data Extracts and future data transfers to your Destinations.

Prerequisites

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

Adding a target field

To map source fields to target fields with a name of your choice, add a new target field. This creates a new field in the data transferred to the Destination.

To add a target field, follow these steps:

  1. Click the Transfer element and select the Workspace you work with in Connect, Enrich & Transfer.

  1. In the left navigation panel, click Data Schema.

  2. In the top right corner of the page, click Add Target Column.

  3. In the Name field, write the name of the new field. Use only lower-case letters, numbers, and underscores.

  4. In the Type field, select the data type. For more information on data types, see Data types used in data harmonization.

  5. (Optional) In the Length field, specify the maximum character length of the values in the new field. This option is only available if you select String in the Type field.

  6. In the Measure field, specify the mathematical function underlying the values in the new field. This option is only available if you select a numerical data type in the Type field, and it only has an effect if you transfer data to Explore & Present. For more information, see Measures used in data harmonization.

  7. Click Save.

Setting key columns

Key columns uniquely identify a data set. Use key columns to ensure that data is correctly overwritten when you transfer data to the Destination that you assigned to the Datastream. For more information, see Configuring transfer settings.

You can only set dimension fields as key columns.

To set a field as a key column, follow these steps:

  1. Click the Connect element and select the Workspace you work with in Connect, Enrich & Transfer.

  1. Select the chosen Datastream.

  1. In the top navigation panel, click Schema Mapping.

  1. Find the field in the list.

  2. In the Key Column column, enable the toggle.

  3. Click Save Mapping.

After changing the key columns, you need to perform additional actions to transfer data to some Destinations. For an example, see SQL Database Destination reference.

To overwrite data in a Destination based on key columns, select Key Columns in the Destination configuration. For more information, see Configuring transfer settings.

Some Destinations do not support overwriting data with key columns. For an example, see Google BigQuery Destination reference.

Changing a field's internal data type

When you fetch a Data Extract, Adverity automatically detects and configures the internal data type for each field. The internal data type of a field is separate from the data type you set in Schema Mapping. Adverity only uses the internal data types when you transfer the Data Extract to a Destination without applying Schema Mapping.

To change a field's internal data type in a Data Extract, follow these steps:

  1. Click the Connect element and select the Workspace you work with in Connect, Enrich & Transfer.

  1. Select the chosen Datastream.

  1. In the left navigation panel, click All Extracts.

  2. In the list, click the top hyperlinked element in the Name column.

  3. Hold the pointer over one of the column headings, and then click Details.

  4. In the Columns section, find the field in the list.

  5. In the field's row, click the drop-down menu on the right.

  6. Select the new data type for the field.