I have a table below: (col 1- 4). I want to create a 5th column based on value column…expected output is as shown below
id order_id value amount expected value
1 id1 mobile 1000 mobile, laptop
1 id2 laptop 2000
2 id3 accesory 3000 accesory
What nodes should I use to transform the value column
and welcome to KNIME Community!
If I got it right you need to do Grouping based on id column where you want to concatenate value column and then bring it back as new column but only for first entry in a group. If that is correct you can use Group By node where id is your grouping column and in aggregation methods you need to use First on order_id and Concatenate on value. Then use Joiner node on id, order_id to bring concatenated values to original data.
Hope this gets you started.
HI, Thanks for the response.
Grouping is fine, however how do I get the value column to show “mobile,laptop”.
I need to convert rows to columns by concatenating column values
Narrowing down the q:
2 printer, acc
if you need to convert them to real columns then pivot node
If you just want one column with comma seperated values then as @ipazin said use groupby and as aggregation concatenate with “,” seperator