Into Parts from Left...

Description

Starts from the left and splits a column into two more columns, depending on a separator (split delimiter) you define. The separator may be a single character or ubstring.

When a split delimiter is specified, Data Prep Studio automatically scans the values in the column starting from the left and presents the column count (i.e., how many columns are produced by the given split delimiter) and split limit (i.e., the maximum number of occurrences of the split delimiter the values in the column contain). Thus, when a column containing the values "11857 Research Blvd, Hwy 183 Austin, TX 78759" and "111 William Cannon C-1 Austin, TX 78745" is split using a comma (,) as a split delimiter, the column count and split limit are updated with the values 3 and 2, respectively.

 

You can modify the column count and split limit by specifying your desired values for these fields. Continuing from the example above, if the column count is reduced to 2 and the split limit of 2 is retained, the split operation for 11857 Research Blvd, Hwy 183 Austin, TX 78759 will yield two columns: one containing the value 11857 Research Blvd and the other containing the value Hwy 183 Austin. If, instead, the split limit is set to 1 and the column count of 3 is retained, the split operation will yield three columns: one containing the value 11857 Research Blvd, one containing the value Hwy 183 Austin, TX 78759, and the last containing a null value.

By default, all columns resulting from the split operation are added to the resulting table. However, in some cases, not all columns resulting from the split operation are useful to you. You can select specific columns to add to the table by clicking the Deselect All Columns button and then selecting which specific columns you wish to bring into the table instead. 

Input/Output Data Type

Input

Output

text

text

 

Example

In this example, Customer is the original column. We split the column into 2 columns (i.e., Customer1 and Customer2) from the left using a space as the separator and a split limit of 1 (i.e., split the value at the first occurrence of the delimiter).

 

In this example, Customer is the original column. We split the column into 2 columns (i.e., Customer1 and Customer2)  from the left using a space as the separator and a split limit of 2 (i.e., split the value at the first two occurrences of the delimiter). Note how, compared with the example above, the values in Customer 2 appear "truncated." If we had specified a column count of 3, the complete value of the Customer column would display three columns. In this case, rows corresponding to Bluegrass Records will be empty in the third column.

 

 

© 2024 Altair Engineering Inc. All Rights Reserved.

Intellectual Property Rights Notice | Technical Support