skipuntil
Remove rows from the data extract until a certain value is found.
This guide explains how to configure the skipuntil instruction. To learn about another instruction, go back to the Available custom script instructions overview.
Introduction
Use the skipuntil instruction to remove rows from a data extract until a given value is found. You can choose to include or exclude this value from the data extract.
Creating a custom script enrichment using the skipuntil instruction
To create and configure a custom script using the skipuntil instruction, follow these steps:
-
In the Instructions step, select the skipuntil instruction.
-
To configure the custom script instruction, fill in the following fields. Required fields are marked with an asterisk (*).
-
Prefix*
-
Enter the value to which the enrichment will skip. All the rows above the row containing this value are removed from the data extract.
-
Fieldname
-
Enter the name of the column that contains the value to which the enrichment will skip.
-
Yield Match
-
Select this option to keep the row that contains the Prefix value.
-
Strict
-
Select this option to raise an error if a field could not be found during the enrichment. Leave this field unselected to continue with the enrichment if a field is not found.
-
Keep Header
-
Select this option to keep the header of the data extract.
-
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
-
Prefix*
-
Brand
-
Fieldname
-
Ad Group
-
Yield Match
-
Select this field.
-
Keep Header
-
Select this field.
Data table before enrichment
Campaign |
Ad Group |
Clicks |
---|---|---|
Brand |
media |
7 |
Brand |
ecommerce |
3 |
Dashboard |
Brand |
18 |
Brand |
ecommerce |
4 |
Dashboard |
media|social |
5 |
Dashboard |
media |
11 |
Data table after enrichment
Campaign |
Ad Group |
Clicks |
---|---|---|
Dashboard |
Brand |
18 |
Brand |
ecommerce |
4 |
Dashboard |
media|social |
5 |
Dashboard |
media |
11 |