The Text Transform block enables you to define operations used to manipulate the contents of variables from an input dataset.
The following demonstrates how to use the Text Transform block to remove punctuation from a variable in the input dataset lib_books.csv (which contains observations that describe a range of books available from a lending library).
- Import the lib_books.csv dataset onto a Workflow canvas using the Text File Import block.
- Expand the Data Preparation group in the Workflow palette, then click and drag a Text Transform block onto the Workflow canvas.
- Click the Output port of the lib_books dataset block and drag a connection towards the Input port of the Text Transform block.
- Double-click the Text Transform block to display the Text Transform editor view.
- In the Text Transform editor view:
- In the Input Variable drop-down list, select LastAccessed.
- From the Remove drop-down list, select Character set.
- In the character set options, select Punctuation.
- Press CTRL+S to save the configuration.
- Click OK to save the configuration and close the Text Transform editor view.
A green execution status is displayed in the Output ports of the Text Transform block and the new Working Dataset. The Text Transform block output dataset contains the input dataset where punctuation is removed from the LastAccessed variable.