Merging Column

Hi

I was trying to organise my data set for some other software using knime and i wanted to move data from col 4 to col 6 , col 7 to col 9 and so and so forth to bring them all directly below col 1 to col 3

for eg
from

to

but with multiple set of 3 col , 28 set i think ?

Thanks for the help.

This workflow does what you want, it depends on the columns being in the right order and no additional column there that messes things up. Basically it splits the datasets, reassigned the column headers and concatenates everything back.

You could give it a try.

kn_example_three_columns_split.knwf (106.7 KB)

1 Like

Hi there!

Here is a solution using Lag Column node combined with case logic in Column Expression nodes.

2019_04_01_Concatenate_within_table.knwf (28.8 KB)

Br,
Ivan

1 Like

Thanks for the help
it work just as i required it haha

i really need to study javascript to understand how the column expression work

1 Like

Hi!

Glad it helped. I would say there is really no need to study JavaScript a lot for Column Expressions node. Here is the tutorial I always check when dealing with Column Expressions node because I do not know the JS syntax :smiley:
https://www.w3schools.com/js/

Br,
Ivan

1 Like