How to convert row wise data in to a cell [Format should be Set] ?

How to group the data and get the corresponding data of other column in a ‘Set’ format?!
I have attached the screenshot of my question with the question.

Date Order_id Product
2/8/2021 91 Burger1
2/8/2021 91 Burger4
2/8/2021 91 Burger2
2/8/2021 91 Burger9
2/8/2021 91 Burger1
2/8/2021 91 Burger3
2/8/2021 91 Burger5
2/8/2021 94 Burger2
2/8/2021 94 Burger3
2/8/2021 94 Burger4
4/8/2021 97 Burger7
4/8/2021 97 Burger2
4/8/2021 97 Burger5
4/8/2021 97 Burger3
4/8/2021 97 Burger2
4/8/2021 97 Burger3
Desired output
Date Order_id Product
2/8/2021 91 [Burger1, Burger4, Burger2, Burger9, Burger1, Burger3, Burger3]
2/8/2021 94 [Burger2, Burger3, Burger4]
4/8/2021 97 [Burger7, Burger2, Burger5, Burger3, Burger2, Burger3]

ques|604x494

Hi @gunju91 welcome to KNIME

Did you try a GroupBy (on date and order_id) and List as the aggregation function?


Schermafdruk van 2021-09-24 19-27-42
gr. Hans

4 Likes

Hi @HansS
Thanks for the answer. I tried GroupBy on ‘Order id’ only. Let me try on both date and order id.

1 Like

Hi @HansS
I tried it’s not working

1 Like

Hi @gunju91
Strange, this works on my machine data_to_list.knwf (6.9 KB)

5 Likes

Hi @gunju91 The groupby suggested by @HansS should work. Can you show what you did?

4 Likes

I referred your file & tried it. It’s working absolutely file.
Thanks a ton for the help to a beginner like me.

I have alsoKNIME_GunjarFuley_project3.knwf (8.3 KB)
attached the file on which I am working.

3 Likes

Hi @bruno29a
You are 100% correct. It’s working.
Thanks for the support.

Hi @gunju91

Glad to here its working. And a tip:
Be aware when uploading a workflow you uncheck the option Reset Workflow(s) before export. Your csv reader is pointing to a file on your machine, but it is not loaded.
Happy KNIMEing.
gr. Hans

4 Likes

Definitely, I shall consider it from next time when I import.
Thanks a lot!

4 Likes

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