Search code examples
data-processingknime

In Knime, how do I split rows that have multiline values in one cell, duplicating the rest of the cells?


I've loaded a spreadsheet (originally from Excel) into Knime, and it contains rows where cells in a particular column can have multiple values, separated by line breaks:

cells with multiple rows

I'd like to split them out so that each value is on it's own row, and that the information in all the other columns is copied, so my example would look like this:

desired output

Note: there is no consistency to how many extra lines are in each row, and as this is part of a repeatable process I'd like the processing to be in Knime rather than in the excel spreadsheet.

Any help would be appreciated.


Solution

  • I think if you use a Cell Splitter node to split the cell on the line breaks you should get to what you want - select the option to output as a list, and then follow with an Ungroup node