Search code examples
knime

Write result of a loop into a table knime


right now I am writing a loop in knime and the result for every row is saved into a csv file , which is quite slow as my disk is quite slow. The result looks like this (for one row):

columnA
"A"
"B"
"BB"

My knime workflow looks like this: enter image description here

How can I replace the csv write node, that I get a big table like this:

Rownumber columnA
1         "A"
1         "B"
1         "BB"
2         "C"

The idea is that I save the csv add the end (after the loop) to jsut have once the speed of my disk.


Solution

  • Use a Loop End (2 ports) node, and connect the second input port to the output of your Concatenate (Optional in) node. Then plate the CSV Writer after the loop end, attached to the 2nd output port. Alternatively, if you are not using the output from 'Node 90', then just connect the Concatenate (Optional in) node output to the Loop End input, and then put the CSV Writer after the loop end.

    enter image description here