Value Mapper
Overview
This operator replaces a specific value in a dataset.
Procedure
-
Drag the
Value Mapperoperator from the dataflow operator panel into the canvas on the right.
-
Click the
Value Mapperoperator and choose the column whose values need to be replaced.
-
Configure the replacement rule by entering
Original Value -> Replacement Value.
-
Configure how replacement results are written as needed:
- Overwrite the original column
- Create a new column, which must be named manually
-
Configure values that do not match the replacement rule as needed:
- Keep the original value
- Use a new default value, which must be defined manually
-
After all configuration is complete, preview the result.
Example
The following example uses value replacement in the Product Name column and changes Chocolate Milk Tea to Chocolate Milk.
-
Click the
Value Mapperoperator and chooseProduct Nameas the target column. -
In
Configure Replacement Rules, set the original value toComplete English Exercise Book Collectionand the target value toGrade 6 Complete English Exercise Book Collection.
In real business scenarios, if a store name changes, the related store information table must also be updated. In this case, batch data replacement can help users complete the update efficiently.
-
Select the target column to Value Mapper in.
-
Set how the replacement results are written: overwrite the original column or create a new column.
-
Configure how values that do not match the replacement rules are handled: use the original value or use a default value.
