Updated on 2023-05-06 GMT+08:00

String Reverse

Overview

The String Reverse operator reverses existing fields to generate new fields.

Input and Output

  • Input: fields to be reversed
  • Output: new fields

Parameter Description

Table 1 Operator parameter description

Parameter

Description

Type

Mandatory

Default Value

Fields to be reversed

Information about fields for string reversal conversion:

  • input field name: Names of input fields. Set this parameter to the names of fields generated in the previous conversion step.
  • output field name: Names of output fields.
  • type: Field type.
  • out field length: Field value length. If the actual field value is excessively long, the value is cut based on the configured length. When type is set to CHAR, spaces are added to the field value for supplement if the actual field value length is less than the configured length. When type is set to VARCHAR, no space is added to the field value for supplement if the actual field value length is less than the configured length.

map

Yes

None

Data Processing Rule

  • Value reversal conversion is performed for fields.
  • If the input data is null, no reversal conversion is performed.
  • If the number of input field columns is greater than the number of field columns actually included in the original data, all data becomes dirty data.

Example

Use the CSV File Input operator to generate fields A and B.

The following figure shows the source file.

abcd,product
FusionInsight,Bigdata

Configure the String Reverse operator to generate two new fields C and D.

After conversion, four fields are generated, as shown in the following figure.

abcd,product,dcba,tcudorp
FusionInsight,Bigdata,thgisnInoisuF,atadgiB