Is there a node for grouping data like Case statements

I am trying out Knime and on an assaignment I am currently working on I am trying to see if there are point and click nodes that would make data manipulation easier. I am connecting to a Database and am pulling a table like
name Gender Age
user1 male 40
user2 male 44
user3 female 28
user4 male 42
user5 male 41
I then want to group the data into segments like Age Group
Name Gender Age AgeGroup
user1 male 40 40-48
user2 male 44 40-48
user3 female 28 25-30
user4 male 42 40-48
user5 male 41 40-48
I know to do this in SQL but I am exploring the nodes to see if there is a way we could group data into segments like in a SQL CASE statement in KNIME ?

You can use Rule Engine node

$Age$ >= 25 and $Age$ <= 30 => “25-30”
$Age$ >= 40 and $Age$ <= 48 => “40-48”
so on.


That worked, thanks!

1 Like

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