There is a new KNIME forum. You can still browse and read content from our old forum but if you want to create new posts or join ongoing discussions, please visit our new KNIME forum: https://forum.knime.com

Concatenate table row into one string

Member for

8 years 2 months Wei_Cheng

Hello,

I would like to loop through all row in a column and concatenate all row value into a string with a delimiter '-' in between.

Please help

 

Wei

Comments
Sat, 03/29/2014 - 06:56

Member for

9 years 7 months

richards99

You shouldn't need to loop.

just use the groupby node. Don't group on any column, and instead aggregate on the column of interest, and choose concatenate as the aggregation type. You can change the delimiter in the dialog to - as well. 

Hope this helps

simon. 

Sun, 03/30/2014 - 11:19

Member for

8 years 2 months

Wei_Cheng

Thanks this is so simple:)

Wed, 02/28/2018 - 04:04

Member for

5 years 1 month

jagmohan111

Hello All

I need to concatenate row wise in and get the desired out put in next column, any suggestion on how to do that "GroupBy" can only concat all rows but i need to do that progressively and for all rows above the current row: example below, 

first column is column with data and second column is progressive row wise concatenation

A      A

B      AB

C      ABC

D      ABCD

Files
Wed, 02/28/2018 - 04:09

Member for

5 years 1 month

jagmohan111

example
col1 col2
A 0
B A
C AB

rather i need to to like above case

 

Wed, 02/28/2018 - 06:18

Member for

10 years 2 months

Iris

You can do this with the moving aggregation node. use cumulative computation and the option to concatenate strings.

Cheers, Iris

 

PS: This would be more a new thread as it is very different to this question here. 

Thu, 03/01/2018 - 07:17

Member for

5 years 1 month

jagmohan111

Thanks a lot, it worked :-)

Is it possible now to move it to a new thread