Purpose
Find and replace any part of a text, whether whole words, partial words, or phrases.
Category Location: All, Calculate or manipulate, Clean or normalize
Field Description
- Replace text found in: Select the attribute to replace values in.
- Add text to replace: Type text to replace.
- Replace with: Three options: replace with text, replace with blank, replace with new line.
- Replace with: This option is available when replace with text is selected in #3. Type text value to replace with.
- Visualize spaces: If selected, you will see a bullet where you've typed a space
- Select or search input data: Optional: select a reference data source to identify values to replace.
- Search and find: Select the attribute in the reference data source that contains the values to replace.
- Replace with attribute: Three options: replace with attribute, replace with blank, replace with new line.
- Replace with: Option available when replace with attribute is selected in #8. Select the attribute in the reference data source that contains the replacement value.
- Write replaced value to: Select the attribute to house the results.
- Ignore Case: Select this checkbox to analyze values on a NON case sensitive basis.
- Match whole word only: Select this checkbox to match on whole words only.
Tips
- This is similar to any search and replace function you would find in word processor or spreadsheet.
- If you have a short list of words to search and replace, just specify them in the task configuration.
- If you have a long list of words to search and replace, then it is best to prepare a list and import it as a reference Data Source.
- You can chose to replace the search string with text, a new-line, or a space (blank).
- In the advanced options you can specify if the search should be case sensitive or if the search should be whole-word match only.
-
Occasionally, non-printable whitespace characters sneak into data. These characters can cause processing in Openprise to produce unexpected results. To remove these characters, you can use the Search and Replace task along with the data catalog file "Reference - Whitespace Character". The reference file contains an attribute named "Character" that is used to identify values to replace. The reference file contains an attribute "Space" that can be used to replace the non-printable character with a standard space.
Examples
-
Expand common abbreviations such as:
- Find "V.P." and "VP" and replace it with "Vice President"
- Find "SFO" and replace it with "San Francisco"
-
Bulk changes such as:
- Find "China, Hong Kong, Taiwan" and replace it with "Greater China"
- Find "DF16" and replace it with "Dreamforce 2016"