convertall

Convert all the values in a data extract using a Python string method.

This guide explains how to configure the convertall instruction. To learn about another instruction, go back to the Available custom script instructions 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:

  1. Create a custom script transformation.

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

  3. 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