Feature request: allow the Many to One node to create an array in case of multiple matches

Now the Many to One node gives an error message if it finds more than one match. Sometimes it makes sense to have multiple matches and have the result in an array cell. The simplest way to do this now is (according to me) with the following sequence: Column Splitter -> Unpivot -> Row Filter -> GroupBy -> Joiner. This is slow and can create large intermediate tables. One could sandwich this between a Chunk Loop but that makes it even more complicated and does not seem to make it faster. Or is there a different node that can do this that I am not aware of?

1 Like

This is a faster way to do Many-to-One with arrays, but it is much less intuitive:

many_to_one

The Java Snippet removes elements from the column header collection column that do not have a corresponding “1” in the value collection column.

Hi @Aswin -

Thanks for the feedback. Let me think a little bit about how to best digest this, so I can pass it on to the developers.

Thanks for your response @ScottF

Perhaps an example makes it more clear. I think it would be nice if the ManyToOne node could go from

fromManyToOne

to

toManyToOne

in one go. The OneToMany node could do the reverse.

Best, Aswin

1 Like

Thanks for the example - that does indeed help. :slight_smile:

2 Likes

Any chance that it will be implemented? :smiley: The more I think about it the more I like this potential feature. I have a table with chemical compounds as rows and metabolic pathways in the columns. Problem is, there are a lot of different pathways, and compounds can participate in more than one. Being able to easily expand and collapse the pathway columns with the ManyToOne and OneToMany nodes would make handling this information a lot easier.

I can’t promise anything, but I’ll definitely write up a ticket for this feature request in our system (and point to this thread). Thanks again! :slight_smile:

1 Like