cutout
Select and remove specific columns from a data extract.
This guide explains how to configure the cutout instruction. To learn about another instruction, go back to the Available custom script instructions overview.
Introduction
Use the cutout instruction to remove selected columns from a data extract.
For example, if you have 30 columns and want to remove 3, use cutout to select the three columns you want to remove. If you have 30 columns and want to keep 3, use cut instead to select the columns you want to keep.
Creating a custom script transformation using the cutout instruction
To create and configure a custom script using the cutout instruction, follow these steps:
-
In the Configuration step, select the cutout instruction.
-
To configure the custom script instruction, fill in the required fields below, as well as any optional fields you require:
-
Fields (required)
-
Select String and enter the name of the column to remove from the data extract, or select Integer and enter the position of the column to remove from the data extract.
Click to add multiple columns to remove from 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 transformation 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 transformation and optionally as the output.
Example
Transformation configuration
-
Fields
-
Ad Campaign
andClicks
Data table before transformation
Ad 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 table after transformation
Ad Group |
Date |
---|---|
In-App |
2022-02-11 |
In-App |
2022-02-11 |
Media |
2022-02-11 |