cut
Cut and keep fields from a data extract.
Introduction
Use the cut enrichment instruction to keep fields in a data extract and remove all unselected fields. Enter the names of the fields to cut and keep. To remove certain fields from a data extract, use the cutout enrichment instruction. Alternatively, use the cutre instruction to find the columns to keep using a regular expression.
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 (*).
-
Fields*
-
Enter the names of the columns to keep from the data extract. Select if the name of the column is a string or an integer. Click
to add multiple fields to keep from 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
-
Fields
-
Campaign
andClicks
Data tables before enrichment
Campaign |
Ad Group |
Clicks |
Date |
---|---|---|---|
Brand |
In-App |
5568 |
2022-02-11 |
Ecommerce |
In-App |
7815 |
2022-02-11 |
Growth |
Media |
6443 |
2022-02-11 |
Data tables after enrichment
Campaign |
Clicks |
---|---|
Brand |
5568 |
Ecommerce |
7815 |
Growth |
6443 |