fillright
Fill empty fields in the data extract using values in the field to the left of an empty field.
Introduction
Use the fillright enrichment to fill in the empty fields in a data extract. Choose what Adverity should treat as an empty field and these empty fields are populated with values from the field to the left of the empty field.
Empty values in the first column will remain empty as there is no field to the left with which to populate the field to the right. If a field in the first column contains an empty value and there are consecutive empty fields to the right of this empty field within the same row, then these fields will remain empty as there is no value with which to populate them (this is shown in the example below).
Creating the enrichment
For more information on creating an enrichment, see Using custom scripts.
Configuring the enrichment
To configure the enrichment, fill in the following fields. Required fields are marked with an asterisk (*).
-
Missing
-
Enter the missing value for Adverity to search. For example, a value like
null
orn/a
could be treated as a missing value. Leave this field blank to search and fill only the fields that are empty.
-
Subtable
-
Enter the name for a subtable that you want to contain the enriched data. The enrichment is applied to the whole data extract, then the enriched data is output into the subtable you have named here.
This subtable is a temporary table, which means it 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.
Example
Enrichment configuration
-
Missing
-
null
Data table before enrichment
Campaign |
Ad Group |
Clicks |
Impressions |
---|---|---|---|
Brand |
media |
2792 |
7766 |
Brand |
ecommerce |
2792 |
9124 |
Brand |
null |
null |
2345 |
Dashboard |
ecommerce |
null |
556 |
Dashboard |
longevity |
4875 |
7935 |
null |
media|social |
6531 |
null |
Outreach |
null |
8619 |
2649 |
Outreach |
organic growth |
3260 |
5689 |
null |
null |
null |
4176 |
Data table after enrichment
Campaign |
Ad Group |
Clicks |
Impressions |
---|---|---|---|
Brand |
media |
2792 |
7766 |
Brand |
ecommerce |
2792 |
9124 |
Brand |
Brand |
Brand |
2345 |
Dashboard |
ecommerce |
ecommerce |
556 |
Dashboard |
longevity |
4875 |
7935 |
null |
media|social |
6531 |
6531 |
Outreach |
Outreach |
8619 |
2649 |
Outreach |
organic growth |
3260 |
5689 |
null |
null |
null |
4176 |