Updated on 2024-11-29 GMT+08:00

String Reverse

Overview

String Reverse: converts generated fields into new fields in reverse order.

Input and Output

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

Description

Table 1 Operator parameters

Parameter

Description

Type

Mandatory

Default Value

Fields to be reversed

Information about the fields to be reversed

  • input field name: Names of the input fields. Set this parameter to the names of the fields generated in the previous conversion step.
  • output field name: Names of the configured output fields.
  • type: field type
  • output field length: Field value length. If the actual field value is excessively long, the value is cut based on the configured length. If type is CHAR, spaces are added to the field value for supplement if the actual field value length is less than the configured length. If type is 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 Rules

  • Reverse the values of fields.
  • If the input data is null, no conversion is required.
  • It can be configured that all data becomes dirty data when the number of input field columns is greater than the number of field columns actually included in the original data.

Example

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

The source file is as follows:

abcd,product
FusionInsight,Bigdata

After the String Reverse operator is configured, two new fields C and D are generated.

After the conversion, four fields are generated in sequence:

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