I'm trying to figure out which is the best way for optimize the workflow execution without repeating every times the same nodes. For example if I have to combine some different columns I'll need to run the column combiner maybe n-times the number of actions I want to perform. Of course each nodes will have different directive inside, but the node repetition sounds to me really repetitive.
I mean something like:
Column Combiner (maybe for merge column_1 with column_2) > Column Combiner (maybe_for merge column_3 with column_4)> Column Combiner(maybe_for merge the result of merging column_1 and column_2 together and column_3 and column_4 together) >....
Is there a smart solution (maybe a loop logic) that can prevent nodes repetition?
sure Loops will definitely help you here. A good start is my mini course on them :-)
You can find the order of the 5 you tube videos here. https://tech.knime.org/wiki/looping-in-knime
Hope you like it!
Thank you very much Iris!
I'll watch them all right now, and I'll let you know if is all clear to me.
Okay, I have seen all the videos, but it's still not clear to me how should I correctly apply loops for example to a lots of column combiner nodes.
If you can take a look to my workflow I'm trying to extract association rules with Borgelt node, and in the input preprocessing metanode I have converted transactions in single-dimentional view using someting like 12 column combiner nodes.
Maybe you can suggest me some concrete tips for try a loop?
Of course I don't know if my workflow logic is really correct since I didin't group by for an invoice number or something like that for retrieve each transaction....I really don't know if this is the smarter way for extract association rules, maybe you can also tell me if my nodes logic makes sense or not.
Should be really important for me.
This the workflow: https://drive.google.com/open?id=0B_RI8-L_88oXblJDOGFOTEt4aGM
This the data: https://drive.google.com/open?id=0B_RI8-L_88oXcWNKMU5JSUF1LU0
Thanks in advice!
please take a look at the attached workflow. There I implemented two solution for your.
Thank you very much Iris!
So if I understand well the 2 solutions that you have provided perform the same operation, one using column loop and java snippet, so in each iteration we look to the current column name and we use the join for merge the column name and each column value from iteration 0 to n-times.
So I have a couple of questions:
- the only way to perform operations with loops is with java snippet (string manipulation ecc ecc..) ?
- If I want to make a loop over different assoiation rules execution should I do something like this:
In the groupBy result I have 3 different lists that I want to process as bit vector on association rules node (Borgelt). And in that case I can pass as ColumnName input the currentIteration flow variable.
But in that case, what kind of configuration I need to do in string manipulation in order to perform the operation inside the loop 3-times?
-The second solution instead uses the pivoting nodes that I never used at this moment. Probably I'll need to take a look to the documentation for understand it better.
Anyway you've been a great help for me.