Update Fields Operator
Overview
The Update Fields operator updates fields values when certain conditions are met.
The types supported at present include BIGINT, DECIMAL, DOUBLE, FLOAT, INTEGER, SMALLINT, and VARCHAR. When the type is VARCHAR and the operator is +, strings will be added to the end of field values. The operator - is not supported. For other types, + and - indicate addition and subtraction of values. For all types, = indicates new value assignment.
Input and Output
Input: field
Output: input field
Parameter Description
Parameter |
Description |
Type |
Mandatory |
Default Value |
---|---|---|---|---|
update field name |
Fields to be updated |
string |
Yes |
None |
update operator |
Operator, which can be +, -, or =. |
enum |
Yes |
+ |
update value |
Values to be updated |
The type is the same as the field type. |
No |
None |
Condition logic connector |
Condition logic connector. The options include AND and OR. |
enum |
Yes |
AND |
Conditions |
Filter condition information:
|
map |
Yes |
None |
Data Processing Rule
- The operator checks whether conditions are met. If yes, the operator updates the field values. If no, the operator does not update the field values.
- If the field values are digits, the updated values are digits.
- If the fields are of the string type, the operator - cannot be used.
Example
Use the CSV File Input operator to generate two fields A and B.
The following figure shows the source file.
Configure the Update Fields operator to update a value by adding good to the end of the value if the value is test.
The following figure shows the output result.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.