Workflow: Counting Loop
This workflow implements two example of a counting loop with 4 iterations and two different loop endings - Loop End and Loop End (Column Append node).
First, we generate fake data with 3 clusters over 2 coordinates (x,y). In each loop iteration, the input data table is processed in the loop body and a new data table is produced. In the Expression node, we add the current iteration number to the value of the x axis and overwrite its value (e.g., x+0 in the first iteration, x+1 in the second iteration, etc.).
At the end of the loop, we need a dedicated node to end the loop. Here we show to examples:
Loop End: Collects the results of each iteration by row-wise concatenation of the incoming tables.
Loop End (Column Append): Collects the results of each iteration by joining the tables on their RowIDs.
Compare the resulting data tables of the loop end nodes and the Scatter Plots to see the difference.