Replace transformation
A transformation type of Replace will transform data from the incoming file by replacing all occurrences of a defined value in a string, or only the first occurrence of a value in a string.
Example: If you replace all occurrences of “J” with “j” in “John James”, you get “john james”. If you select to replace the first occurrence in this string, you will get “john James”
To configure a replace transformation:
- Locate the data model attribute you want transformed and click its Transform link. The Transform dialog is displayed, and it shows the source fields (source) and schema attributes (target).
- Use the Transformation type list to select Replace.
- Select if you want to replace all occurrences or only the first occurrence.
- In the Original value field, enter the value that you to replace. In the New value field, enter the value you want to replace the original value. You have the option of leaving the New value field blank. Values you enter in both fields are case-sensitive.
- Optionally, test the transformation by entering a value in the Sample input field. The transformed value will display in the Output field.
- Click Apply.