I would like to create a sequence in KNIME from the following data records, the IDs mentioned are connected to each other and should be displayed in a column in the correct order.
The two workflows are commented step by step on the nodes but please get in touch if it is not clear enough.
Hope it helps.
Best
Ael
Edit: Sorry @torres000, @ScottF, @goodvirus & @elsamuel for I needed to delete previous post and update it because of a bug. Now this new version is updated and fixed. Thanks for your likes.
Haha ha, Merci beaucoup Bruno ! Ça me fait plaisir un tel commentaire, surtout venant de toi ! J’espère que les congrès de KNIME reprendront vite un jour et qu’on aura l’occasion d’être en présentiel au même temps pour faire connaissance.
Bonne soirée !
Glad it helped you and thanks for validating the solution.
Concerning your question:
The best way would be to wrap one of the two solutions with a -Group Loop Start- and a -Loop End- nodes, to handle the problem by individual IDs. I would recommend to encapsulate the solution into a component before wrapping it into this extra grouping loop.
This new solution should look as follows (here below fake workflow just for explanation, not really implemented):
Maybe you have had the time to play a bit with the solution I suggested based on a -Group Loop Start- -Loop End-, which should solve the more general problem you described in your last post.
Besides this possible solution, please find below a generalized solution which does not need adding an extra loop:
This alternative solution should also be much more efficient since it implicitly calculates when the loop should finish based on the minimum number of rows allowed in the final tables arriving to the -Recursive Loop End- node. The loop stops iterating when the third input of the -Recursive Loop End- is an empty table. Again, I have commented every node but please get in touch if you need further help or explanation.
Thanks for your feedback and for validating this last version.
My pleasure to help and really glad it worked. I fully understand that the idea of recursion is not obvious and as you could see, we needed several iterations to get to this final more efficient version
Please feel free to get back in touch if you have any further questions about its implementation.