split-column adaptor splits values in a column into a number of columns using a specified separator to determine where to make each split.
data
Type: datatable
Required: Yes
The datatable containing the column to be split.
column name
Type: text
Required: Yes
The name of the column to be split.
separator
Type: text
Required: Yes
The separator text, or regular expression, which denotes the points at which each split should occur. The separator is treated a regular expression if it begins and ends with /.
new column names
Type: list
Required: Yes
The list of columns to be added.
include column
Type: boolean
Required: No
Specifies whether to include the original column in the output datatable. If unspecified, defaults to True (original column will be included).
data
Type: datatable
A datatable with new columns added.
Example 1: Default behaviour.
data:
column name: code
separator: -
new column names: language
include column: null(empty)
data:
-> Created a new column language with the values derived by splitting the values in code column on - separator. The original code column is included in the output by default.
Example 2: Exclude the original column in the output.
data:
column name: code
separator: -
new column names: language
include column: False
data:
-> Created a new column language with the values derived by splitting the values in code column on - separator. The code column is included in the result by default.
Separate a date into components of year, month, and day.