search
Search for certain values in a data extract.
Introduction
Use the search enrichment to find certain values in a data extract using a regular expression. Only the rows of the data extract that contain the values matching the regular expression are kept, and all other rows are removed.
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 (*).
-
Field*
-
Enter the name of the column in which to search.
-
Pattern*
-
Enter a regular expression used to search for values in the data extract.
-
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
-
Field
-
Campaign Start
-
Pattern*
-
(.*)-(.*)-(.*22$)
Data table before enrichment
Campaign Start |
Campaign End |
Ad Group |
Clicks |
---|---|---|---|
01-12-2021 |
10-01-2022 |
media |
7,653 |
31-01-2021 |
28-02-2021 |
ecommerce |
3,106 |
21-12-2021 |
21-01-2022 |
brand awareness |
18,012 |
31-01-2022 |
31-03-2022 |
ecommerce |
4,945 |
05-03-2022 |
15-03-2022 |
media|social |
571 |
10-01-2022 |
31-01-2022 |
media|social |
119 |
Data table after enrichment
Campaign Start |
Campaign End |
Ad Group |
Clicks |
---|---|---|---|
31-01-2022 |
31-03-2022 |
ecommerce |
4,945 |
05-03-2022 |
15-03-2022 |
media|social |
571 |
10-01-2022 |
31-01-2022 |
media|social |
119 |