convertall¶
Convert all the values in a data extract using a Python string method.
Note
This guide explains how to configure the convertall instruction. To learn about another instruction, go back to the Custom scripts available in Adverity overview.
Introduction¶
Use the convertall instruction to convert all the values in a data extract using a Python string method as a converter. For a full list of compatible converters, see the Python documentation.
Creating a custom script transformation using the convertall instruction¶
To create and configure a custom script using the convertall instruction, follow these steps:
In the Instruction step, select the convertall instruction.
To configure the custom script instruction, fill in the following fields. Required fields are marked with an asterisk (*).
- Converter
Enter the name of the converter to use. For a full list of compatible converters, see the Python documentation.
- Fail on Error
Select this field to stop the transformation instruction if an error occurs.
- Errorvalue
Enter the value with which to populate the field if an error occurs.
Example¶
Transformation configuration¶
- Converter
capitalize
Data table before transformation¶
Campaign |
Ad Group |
Clicks |
|---|---|---|
brand |
media |
75856 |
outreach |
weekend ecommerce |
38753 |
organic growth |
socials |
99651 |
Data table after transformation¶
Campaign |
Ad Group |
Clicks |
|---|---|---|
Brand |
Media |
75856 |
Outreach |
Weekend Ecommerce |
38753 |
Organic Growth |
Socials |
99651 |