recode#
Decode and re-encode data in a data extract.
Note
This guide explains how to configure the recode instruction. To learn about another instruction, go back to the Custom scripts available in Adverity overview.
Introduction#
Use the recode instruction to detect data that is encoded differently from a specified encoding type. The transformation then decodes the data and re-encodes it in the specified encoding type
Creating a custom script transformation using the recode instruction#
To create and configure a custom script using the recode instruction, follow these steps:
In the Instructions step, select the recode instruction.
To configure the custom script instruction, fill in the following fields. Required fields are marked with an asterisk (*).
- Fields*
Enter the names of the columns which contain the values for which to check the encoding.
- Charset
Select the encoding type which the values in the selected columns are compared against. If a value in the column does not match the selected encoding type, the values are decoded and then re-encoded in the selected encoding type.
- Fail on Error
Select this field to stop the transformation instruction if an error occurs.
- 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.