convertx
Use a Python expression to convert values in a selected column.
Introduction
Use the convertx enrichment instruction to use a Python expression to convert values in a selected column.
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 containing the values to convert.
-
Python Expression
-
Enter a Python expression to convert values in a selected column.
-
Fail on Error
-
Select this field to stop the enrichment instruction if the conversion cannot be applied.
Example
Enrichment configuration
This enrichment converts every character in the Ad Group column to lower case.
-
Fields
-
Ad group
-
Python Expression
-
{Ad Group}.lower()
Data tables before enrichment
Campaign |
Ad Group |
Clicks |
---|---|---|
Brand |
OnGoing |
75856 |
Outreach |
OnGoing |
38753 |
Organic Growth |
InActive |
99651 |
Data tables after enrichment
Campaign |
Ad Group |
Clicks |
---|---|---|
Brand |
ongoing |
75856 |
Outreach |
ongoing |
38753 |
Organic Growth |
inactive |
99651 |