Overview
Version
FineDataLink Version | Functional Change |
---|---|
4.1.2 | Added the Field-to-Row Splitting operator, which can split field values according to specific rules (separators) and generate a new column to store the split values in different rows. |
4.1.7.3 | Optimized the interactive experience and changed Selected Field to Field to Be Split. |
Function Overview
The Field-to-Row Splitting operator is added, which can split field values according to specific rules (separators) and generate a new column to store the split values in different rows, as shown in the following figure.
Usage Restriction
Only fields with text-type data can be split.
Example
Scenario Description
You can download the example table data: Teacher_Table.xlsx.
Each teacher in the data table corresponds to multiple students separated by comma (,). You want to split the values of the student field to display one student name per record, as shown in the following figure.
Table Data Reading
1. Create a scheduled task, drag a Data Transformation node onto the page, and enter the Data Transformation editing page.
2. Drag a DB Table Input operator onto the Data Transformation page and configure the operator to read the data to be processed, as shown in the following figure.
Field-to-Row Splitting
1. Drag a Field-to-Row Splitting operator onto the Data Transformation page and configure the operator to split the values of the student field, as shown in the following figure.
The following table describes the setting items.
Setting Item | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Field to Be Split | You can select a field with text-type data from the upstream output for splitting. | ||||||||||||
Separator | 1. Available separators include Semicolon, Comma, Colon, Space, and Custom. If you select Custom as Separator, you can input any character or string. The whole input content will be used as the separator to split field values. 2. The logic of splitting fields by separator is described below.
| ||||||||||||
Split Result | 1. Only one field named Original field name_Row Splitting Result is added. 2. The data type of the newly generated column defaults to text. |
2. Click Data Preview, as shown in the following figure.
On the Data Preview page, you can preview the first 1000 rows by default, with 20 rows per page.
Field Renaming
Drag a Field Setting operator onto the Data Transformation page. Rename the student_Row Splitting Result field, as shown in the following figure.
Data Output
1. Add a DB Table Output operator and configure it to output the data after processing, as shown in the following figure.
2. Click Save in the upper right corner.
Effect Display
1. Click Run to execute the task. The running result in Log upon successful execution is shown in the following figure.
2. The table data in the database is shown in the following figure.