Convert Using List

This data converter converts the input text to an output text using a list of conversions. The data converter is useful when converting from the texts used on a particular website to the texts used here, or vice versa. For example, the data converter can be used to convert between country names and country codes.

Specifying the list of conversions

The list of conversions is specified in the Conversions field. For example, a list of conversions from country name to country code could look like this:

    "Australia" = "AUS"
    "Austria" = "AUT"
    "Belgium" = "BEL"
    "Brazil" = "BRA"
    "Canada" = "CAN"
    "China" = "CHN"
    "Denmark" = "DNK"
    "Egypt" = "EGY"
    "Finland" = "FIN"
    "France" = "FRA"
    "Germany" = "DEU"
    "Hungary" = "HUN"
    "Iceland" = "ISL"
    "India" = "IND"
    "Ireland" = "IRL"
    ...

With this list of conversions, the input text "Australia" will be converted to "AUS", the input text "Austria" will be converted to "AUT", etc.

The backslash character (\) can be used to enter special characters in the texts:

  • \n for line break.
  • \r for carriage return.
  • \f for form document.
  • \t for horizontal tab.
  • \b for backspace.
  • \" for double quote.
  • \' for single quote.
  • \\ for backslash itself.
  • \uxxxx for the unicode character with encoding xxxx, where xxxx is four hexadecimal digits.

Quotes around a text can be omitted. In that case, all spaces at the start and end of the text will be removed, the text cannot be empty, and the backslash notation can not be used to enter special characters.

The list of conversions can contain empty lines and comment lines. A comment line starts with two forward slash characters (//).

Handling the case where no conversion matches

The If No Matching Conversion option determines what happens in the case where the input text does not match any of the conversions:

  • Generate Error will cause an error to be generated by the data converter. The error will be handled according to the configuration of the step that uses the data converter.
  • Do Not Convert Text will prevent the input text from being converted, i.e. the input text will be used as output text without any conversion.
  • Convert to Default Text will cause the input text to be converted to the text specified in the Default Text field.

Note: The text in the Default Text field is specified without quotes. If there needs to be a quote character inside the text, it can be entered directly (do not use the \" notation).

Other Properties

The Convert Using List data converter can additionally be configured using the following properties:

Description

Type in a description to be shown in the list of data converters. If there is no type in a description, one will be generated.