I often find myself needing the first or the last row of groups of rows. As far as I can tell there are currently two ways of doing this: use a Group Loop and a Row Filter inside the loop to filter the first or last row (slow), or use a GroupBy node and specify “First” or “Last” for every column or type (awkward and easy to make mistakes in case of missing values, and the rowid is lost).
I suggest a Group-based Row Filter node, where you can indicate to filter the first or the last row of every group. Possible additional features could be the middle row(s), or random row(s) of every group, and a Row Splitter based on the same idea.
Sorry I see the Duplicate Row Filter can be used for this… Forget my post
I would add to this to be able to use aggregators - e.g. the row of each group with the min/max value - I do this so often with a groupby/rowfilter/joiner sequence
Oh wow! It looks like Duplicate Row Filter can do my add-on request too
Maybe “Duplicate Row Filter” is not such a good name for this node, since it is much more fancy than that
Glad to see experienced KNIMErs still discovering KNIME
@Aswin Got any name suggestion?
To be fair (as a node developer myself!) it is often quite easy to come up with a node name which described how you think of a node which is confusing to others… In fact, I’ve sometimes looked at nodes I’ve written a year or two later and been left wondering what the name might mean it does at all . That said, it’s generally - unless a name becomes very misleading - not a good idea to start changing node names on a regular basis, as that’s a definite route to confusing everyone!
As we have plethora of nodes, it is general tendency to miss and then recollect either by self or by forum.
Dear @ipazin I agree with @s.roughley that name changes should be avoided as much as possible. Perhaps the functionality of the duplicate row filter can be split into a more basic node which can still called “Duplicate Row Filter” and a more feature-rich node “Group-based Row Filter” and “… Splitter”… Just a suggestion.
that wouldn’t be backward compatible so don’t think that’s a way to go. Let’s see if this pops up multiple times and then take some action.
the old Duplicate Row Filter could simply get the label “Deprecated”, or is it not that simple?
Not that I am not happy with the current situation, as long as I don’t forget the power of the Duplicate Row Filter node…
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.