Icon

3. Loop on List of Values

<p><strong>Loop on List of Values - Table Row to Variable Loop</strong></p><p>This workflow implements an example of a loop on a list of unique values (row-wise processing) using the <em>Table Row to Variable Loop Start</em> node. The goal of this workflow is to identify the countries included in the file <em>sales.csv</em> and calculate some statistics on sold products for each one of these countries.</p><p>After reading the data, we first isolate the list of unique countries using a <em>GroupBy </em>node with group column "country" and no aggregation method. Then, we pass the list of countries to a <em>Table Row to Variable Loop Start</em> node. This node takes one country at a time and passes it to the loop body (row-wise iteration). In the loop body, the data for the current country are isolated (parametric <em>Row Filter</em>) and statistics on sold products are calculated. Finally, the calculated numbers are collected in the <em>Loop End </em>node as two tables (see the two output ports).</p>

Workflow: Loop on List of Values - Table Row to Variable Loop


This workflow implements an example of a loop on a list of unique values (row-wise processing) using the Table Row to Variable Loop Start node. The goal of this workflow is to identify the countries included in the file sales.csv and calculate some statistics on sold products for each one of these countries.

After reading the data, we first isolate the list of unique countries using a GroupBy node with group column "country" and no aggregation method. Then, we pass the list of countries to a Table Row to Variable Loop Start node. This node takes one country at a time and passes it to the loop body (row-wise iteration). In the loop body, the data for the current country are isolated (parametric Row Filter) and statistics on sold products are calculated. Finally, the calculated numbers are collected in the Loop End node as two tables (see the two output ports).

Reading data

Loop body

Get list of countries
GroupBy
Stats on numericals
Variable to Table Column
For execution speed
Cache
Stats on nominals
Variable to Table Column
sales.csv
CSV Reader
Statistics
Filter data tocurrent country
Row Filter
Loop over list ofunique country values
Table Row to Variable Loop Start
Collect stats forall iterations (countries)
Loop End

Nodes

Extensions

Links