convertnumbers
Converts strings containing numeric characters to numbers.
Introduction
Use the convertnumbers enrichment instruction to convert the numerical characters in a string into numbers. You can determine the locale format of the numbers to convert. For example, long numbers in data from England are often stored as 100,000, whereas German data stores the number as 100.000.
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 (*).
-
Fields
-
Enter the fields containing the values to convert.
-
Locale
-
Enter the location of the numbers to convert. Enter country code, for example, enter en for England or de for Germany. The output format of the converted numbers is en. For example 100000 instead of 100.000.
This field is case sensitive.
-
Default
-
Enter the value to use if the conversion cannot be applied. Enter either a number or select null.
-
Strict
-
If selected, the value None is returned if the conversion fails.
Example
Enrichment configuration
-
Fields
-
Clicks
-
Locale
-
de
-
Default
-
0
Data tables before enrichment
Campaign |
Clicks |
---|---|
Brand |
175.856 |
Outreach |
238.753 |
Organic growth |
99.651 |
Retention |
null |
Data tables after enrichment
Campaign |
Clicks |
---|---|
Brand |
175856 |
Outreach |
238753 |
Organic growth |
99651 |
Retention |
0 |