Icon

1. Counting Loop

<p><strong>Counting Loop</strong></p><p>This workflow implements two example of a counting loop with 4 iterations and two different loop endings - <em>Loop End</em> and <em>Loop End (Column Append node)</em>.</p><p>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.).</p><p>At the end of the loop, we need a dedicated node to end the loop. Here we show to examples:</p><ol><li><p><em>Loop End</em>: Collects the results of each iteration by <strong>row-wise concatenation</strong> of the incoming tables.</p></li><li><p><em>Loop End (Column Append)</em>: Collects the results of each iteration by <strong>joining the tables on their RowIDs</strong>.</p></li></ol><p>Compare the resulting data tables of the loop end nodes and the scatter plots to see the difference.</p>

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:

  1. Loop End: Collects the results of each iteration by row-wise concatenation of the incoming tables.

  2. 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.

Example 1: Loop End

Collects the results of each iteration by row-wise concatenation of the incoming tables.

Generating data

3 clusters, 2 coordinates (Universe_0_0, Universe_0_1)

Visualizing data

Example 2: Loop End (Column Append)

Collects the results of each iteration by joining the tables on their RowIDs.

Writing data

Calculate: Universe_0_0 + iteration nr
Expression
Join datasets ofeach iterationon RowID
Loop End (Column Append)
4 iterations:0,1,2,3
Counting Loop Start
Write to new file
CSV Writer
3 clusters 2 coordinates
Data Generator
4 iterations:0,1,2,3
Counting Loop Start
Visualize the fourx-shifted datasets
Scatter Plot
Color by clusters
Color Manager
Collect dataset of each iterationand concatenate with previous ones
Loop End
Visualize x-shifteddata of iteration 2
Scatter Plot
Visualize original data
Scatter Plot
Calculate: Universe_0_0 + iteration nr
Expression

Nodes

Extensions

Links