selectnotnone

Remove rows in a selected column that are empty.

This guide explains how to configure the selectnotnone instruction. To learn about another instruction, go back to the Available custom script instructions overview.

Introduction

Use the selectnotnone instruction to remove rows with empty values from a data extract. If a row contains any values in a given column it is kept in the data extract. This transformation is the opposite of selectnone.

Creating a custom script transformation using the selectnotnone instruction

To create and configure a custom script using the selectnotnone instruction, follow these steps:

  1. Create a custom script transformation.

  2. In the Instructions step, select the selectnotnone instruction.

  3. To configure the custom script instruction, fill in the following fields. Required fields are marked with an asterisk (*).

Field*

Enter the name of the column to search through to find missing values.

Select a column in one of the following ways:

  • Select String and enter the name of the column.

  • Select Integer and enter the position of the column in the data extract as an index value. Counting starts at 0. To select the first column, enter 0. To select the second column, enter 1. To select the last column in the data extract, enter -1.

Complement

Select this field to reverse the transformation. Any rows that contain empty values in the given column are kept data extract and all rows with values in the given column are removed.

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

Field*

Ad Group

Complement

Do not select this field.

Data table before transformation

Campaign

Ad Group

Clicks

Brand

media

7

Branding

Dashboard

brand awareness

18

Brand

4

Dashboard

media|social

5

Branding

media

Data table after transformation

Campaign

Ad Group

Clicks

Brand

media

7

Dashboard

brand awareness

18

Dashboard

media|social

5

Branding

media