extendmissing

Check if certain columns exist in the data extract, and add them if they are missing from the data extract.

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

Introduction

Use the extendmissing instruction to check if certain columns exist in the data extract, and add them if they are missing from the data extract.

Creating a custom script enrichment using the extendmissing instruction

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

  1. Create a custom script enrichment.

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

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

Fieldnames

Enter the names of the columns to find in the data extract.

Missing

Enter the values with which to populate the new columns.

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

Fieldnames

Campaign Status

Missing

Active

Data table before enrichment

Ad Group

Region

Clicks

media

France

3493

ecommerce

Germany

8891

media|social

USA

2782

Data table after enrichment

Ad Group

Region

Clicks

Campaign Status

media

France

3493

Active

ecommerce

Germany

8891

Active

media|social

USA

2782

Active