String
The String transform manipulates string columns by applying string functions.
The following string functions are available, which are applied to the values in each row:
- Trim - Removes whitespace characters at the beginning and end.
- TrimStart - Removes whitespace characters at the beginning.
- TrimEnd - Removes whitespace characters at the end.
- Remove - Removes the specified number of characters starting at the specified position.
- Replace - Replaces all instances of the specified text with the specified replacement text.
- Substring - Keeps only the text at the specified position up to the specified length.
- Left - Keeps only the specified number of characters starting from the left/beginning.
- Right - Keeps only the specified number of characters starting from the right/end.
- ToUpper - Replaces all lowercase letters with uppercase letters.
- ToLower - Replaces all uppercase letters with lowercase letters.
Related video: Data Cleansing with Data Cubes
1. Input
The String transform requires one input transform that has at least one column.
2. Configure
In the String transform configuration dialog, click the Edit icon next to a column with a String data type:
In the Transform Element dialog, choose a String Function.
Click the submit button at the bottom of the dialog when finished.
In the String transform configuration dialog, de-select any columns you don't want to be included in the output.
You can apply string functions to multiple columns/elements in the input with a single transform. To apply multiple string functions to the same column, you can add multiple String transforms.
3. Output
The figure below illustrates the output from the two string transform examples pictured above.