append

Add fields to the data extract from another datastream or subtable.

This guide explains how to configure the append instruction. To learn about another instruction, go back to the Available custom script instructions overview.

Introduction

Use the append instruction to add fields to the data extract from another datastream or subtable. Identical columns are concatenated. New columns are added by default, behaving identically to an outer join.

Creating a custom script enrichment using the append instruction

To create and configure a custom script using the append instruction, follow these steps:

  1. Create a custom script enrichment.

  2. In the Instructions step, select the append instruction.

  3. To configure the custom script instruction, fill in the following fields. Required fields are marked with an asterisk (*).

Streams*

Specify the names of the datastreams from which to add data to the data extract.

Subtables

Specify the names of the subtables from which to add data to the data extract.

Meltdown

Select this checkbox to add data extracts from the current datastream.

All

Select this checkbox to add data from all data extracts. If you leave this checkbox deselected, only data from the most recent data extract is added.

Process extracts by

Specify the order in which data extracts are added. Select one of the following:

  • Most recently scheduled - start adding data from the most recently scheduled fetch.

  • Most recently created - start adding data from the most recently created fetch.

Include tags

Specify tags to only include datastreams with these tags.

Exclude tags

Specify tags to exclude datastreams with these tags.

Errors

To configure Adverity's behavior when an error occurs during the enrichment process, select one of the following:

  • (Default) Select strict to notify you about the error and stop the enrichment process.

  • Select ignore to ignore the error and continue the enrichment process.

  • Select raise to notify you about the error and continue the enrichment process.

Subtable

Enter the name for a subtable that you want to use within this custom script.

A subtable is a temporary table that only exists for this custom script. You can apply additional instructions within the same custom script to the subtable. However, the subtable cannot be used in any other custom scripts.

If a subtable does not exist for the current custom script, the enrichment is applied to the data extract, and the enriched data is output into the subtable. If the subtable already exists for the custom script, the subtable is used as the input for the enrichment and optionally as the output.

Example

Enrichment configuration

Streams

Table 2

Data tables before enrichment

Table 1 (the table to which the enrichment is applied)

Campaign

Ad Group

Clicks

Brand

media

7

Brand

ecommerce

3

Table 2

Campaign

Ad Group

Clicks

Dashboard

media

18

Dashboard

media|social

5

Dashboard

media

11

Data tables after enrichment

Table 1 (the table to which the enrichment is applied)

Campaign

Ad Group

Clicks

Brand

media

7

Brand

ecommerce

3

Dashboard

media

18

Dashboard

media|social

5

Dashboard

media

11

Table 2

Campaign

Ad Group

Clicks

Dashboard

media

18

Dashboard

media|social

5

Dashboard

media

11