Select word
Returns the nth word from the text of the specified column, replacing the text in the column.
Use the Select Word tool when you want to extract a specific word part of the sentence. The Select Word tool returns the nth word from the text of the specified column, replacing the text in the column. If you just want to return part of a sentence irrespective of the word count, use the Text part tool.
With the Output column(s) option, you can add new columns or replace existing selected columns in your data set. The columns append to your data set, with the naming convention of (column)_extracted
, for example: Monthly Sales_extracted
.
Input
The Select Word tool requires one data input.
Configuration
Use the following configuration options to configure the Select Word tool:
Go to the Pipes module from the side navigation bar.
From the Pipes tab, click an existing pipe to open, or create a new pipe. To create a new pipe, read the Creating a pipe documentation.
In the Pipe builder, add at least one data source to your pipe. For more information on adding a data source, see the Data tool.
Click
+ Tool.
The Tools modal opens where you can add tools, such as the Aggregate tool to your pipe.
In the Tools modal, search for Select Word and then click + Add Tool.
Tip
You can also find Select Word in the Clean section.
Click the tool node and drag the line to the next tool to connect the tools. If you need to undo the action, click the line and then click Unlink.
In the configuration pane, enter the following information:
Table 60. Select Word tool configurationField
Description
Columns
Select the columns that you want to use to select words from.
Index
Enter the number for the text position, or use the arrows to increase or decrease the value.
Note
Index refers to the word position in the sentence. If you type 1, the tool returns the first word in the sentence. If you type 2, the tool returns the second, and so on.
Separator
Enter the separator to separate each word. Usually, this is a space.
Advanced section
Output column(s)
Choose between either Add new column(s) or Replaces selected column(s) to add or replace columns in your data set.