Split cells

Hello,

I have a question on how to split string cells in Knime.

The following rows and columns are examples of how the dataset I use looks like:

Name Friends Street
Peter [‘Alfred’, ‘George’, ‘Paul’] Lakeview
Molly [‘Mike’, ‘John’] Seaside
Jason [‘Fred’] King
Ashley [‘Jessica’, ‘Brad’, ‘Justin’] Westside

As a result the second column “Friends” needs to be split into three columns as followed:

Name Friend1 Friend2 Friend3 Street
Peter Alfred George Paul Lakeview
Molly Mike John Seaside
Jason Fred King
Ashley Jessica Brad Justin Westside

How can I do this?

Thank you!

hoppel77

If the Friends column is a collection column then you need a Split Collection Column node. If it is a single text cell, then a Cell Splitter node should cover it

Steve

1 Like