In my example attached I have two tables of data.
One table (Search table (parent child structure) ) contain a parent child hierarch where Column 1 is the lowest child and Column 2 to Column 7 is the hierarchy.
The other table contain children that for some reason is not a lowest child in the data (even if they should be that at one point).
My need is to build that missing hierarchy using the “search table”.
I have added a “Wanted output” to show what I’m hoping for.
Any idea how to do that?
Finding the children in the “values” table was easy. Finding the hierarchy and writing it has been harder.
The only sink nodes (no outgoing edge) are F, G, H, I, J. A, B, C, D are not.
Then use this usefull component All Routes Between Nodes – KNIME Community Hub (thanks @takbb !) to search all paths.
You can look for the end node of each path. There is some questions : there are several solutions for the wanted result. What can be the best choice ?
For example, A considered as child, has this path 1, 2, A but 5, 6, A too :