How to split string and numeric data found in one column into many columns

For example,
ON
OFF
3
4
OPEN
i want to change it to
ON OPEN 3
OFF 4

Hello @woo_yuan_qi,

welcome to KNIME Community!

In your example are those 2 or 3 columns you would like to have? Can you share logic behind it?

Anyways approach you can try is following. Use Rule Engine node and MATCHES operator to determine new column. Then use Pivoting with new column as pivoting column and List aggregation on your original column. Finish with Ungroup node.

Br,
Ivan

1 Like

guihg
Thank You for the quick reply.
As i am new to KNIME, could you show me an example of using the MATCHES operator. Attached is the data set i wish to separate into different columns.
The column i would like to have is the strings(ON, OFF) and numbers(1,2,3) in different columns.

Hi @woo_yuan_qi,

check out example below. You can download it and modify to your needs.

Br,
Ivan

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.