Split a table according to the values of one column

Hello everyone,

is there a node for the following problem? I have a table with a classification column (group in below example) as input. As Output I need two tables, one with all datasets belonging to group 1, one with all datasets belonging to group 2.

name group
abc 1
def 1
ghi 2
jkl 1

Right now I’m doing it with a row filter node filtering for every value occuring in the group column singularly, which is laborious.

Thanks a lot in advance :slight_smile:

Hi @MaxB

Welcome to KNIME forum

Have you tried the Row Splitter node?
gr. Hans

2 Likes

Hi @HansS,

thanks for the welcome and your answer. I’ve tried the row splitter yes. For an example with only two values per group i can see that it’s working well.
My data has about 40 different values…means the output i have after one row splitter is on table as if i had used the row filter, and the other table still containing the 39 groups.
My desired output though is 40 tables.

best wishes

1 Like

Hi @MaxB

Well then you have to use loop. I used a Group Loop that creates a table for every group of rows in your file.proces_rows.knwf (25.1 KB)


Hope this helps.
gr. Hans

4 Likes

Hi Hans,

this is it thank you very much! :blush:
When using it with an XLS-Writer instead of a table writer, I got an error due to the filepath string from the second “string manipulation” node. No idea why though. The “create file name” node solved that.

image

3 Likes

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