Split columns in KETTLE into multiple rows
The "column split into multiple rows" here is actually similar to the explosion function "explode" in hive. It is a column-to-row operation, and it is still very simple to use.
- Drag the'column split into multiple rows' module into the conversion interface, double-click to enter the parameter configuration window of'column split into multiple rows', as shown in the figure below
- Configure the parameters, select the field you want to operate in the "field to be split", fill in the "separator" in which separator you want to split according to, and fill in the newly generated column in the "new field name" Field name.
At this point, the configuration of the parameters is complete, and you can click OK. - Run the conversion and compare the data results. Figure 1 shows the original fields and field contents, and Figure 2 shows the split fields and field contents. The original data contents here are directly viewed through the preview. The split fields and data are Checked in "Preview data" after running the conversion.
Figure 1
Figure 2
From here, we can see that the data has been converted from column to row according to the parameters we configured.