separate a column values basis | delimiter

I have multiple columns where each column have multiple values separated by | delimiter operator. like this
Column1 Column2 Column3
value1 value2 x1|x2|x3
value3 value4 x4
value5 value6 x5|x6

I have to separate column3 values like this:
Column1 Column2 Column3
value1 value2 x1
x2
x3
value3 value4 x4
value5 value6 x5
x6

I hope my question is clear. I can do this in excel using a simple macro. Can anybody please tell me how to do it in Knime. Thanks in advance!

When I posted this the format is different than the one I saw while writing. So the x2 will be in the cell below x1, similarly x3 below x2 and so on. This is my first question here. Sorry for the inconvenience.

Should be a job for the Cell Splitter

kn_example_separate_fields.knwf (11.6 KB)

Hi!

In addition to @mlauber71 solution if you want x2,x3… values all in one column some unpivoting needs to be done together with couple of more nodes.

Here is a workflow:

Split&Unpivot.knwf (11.7 KB)

Br,
Ivan

1 Like

Thanks a lot @ipazin for your answer. Is there any way in which I can slpit two columns on a single node? Or do I have to spilt into two branches from file reader and use one node to split each column. I would like to split both columns on a single node. Is that possible? for more clarity I am attaching the image, the left side is input and right side of it output. I used excel macros to perform this task.

Hi!

If I understood you well I would say you need two Cell Splitter nodes but actually you just need to repeat one more time same/similar process :wink:

Br,
Ivan

Thanks a lot Ivan. I really appreciate your help :slight_smile:

1 Like