Icon

Workflow control - Process data in groups

<p><strong>Process data in groups: Using a loop and flow variables</strong></p><p>This workflow example demonstrates how to process data in groups using a loop and flow variables.</p><p>After accessing the sample data, first the two metrics “Sales Performance” and “Sales Gap” are calculated using the <em>Expression </em>node. Next, based on the "Sales Gap", the "Performance Status" is derived by defining a logic using the <em>Rule Engine</em> node. Using the <em>Group Loop Start</em> node, the data is now processed in groups by "Region" and "Performance Status" and then eventually saved as separate Excel files using the <em>Excel Writer</em> node.</p><p>The sample data has 5 columns:</p><ul><li><p>Product ID: Each product's number</p></li><li><p>Region: North America, South America, Europe, or Asia</p></li><li><p>Sales Date: The transaction date</p></li><li><p>Sales Amount: The amount of each transaction</p></li><li><p>Target Sales: The target amount for each transaction</p></li></ul>

Read data

Process data by "Region" & "Performance Status"

Process data in groups: Using a loop and flow variables


This workflow example demonstrates how to process data in groups using a loop and flow variables.

After accessing the sample data, first the two metrics “Sales Performance” and “Sales Gap” are calculated using the Expression node. Next, based on the "Sales Gap", the "Performance Status" is derived by defining a logic using the Rule Engine node. Using the Group Loop Start node, the data is now processed in groups by "Region" and "Performance Status" and then eventually saved as separate Excel files using the Excel Writer node.

The sample data has 5 columns:

  • Product ID: Each product's number

  • Region: North America, South America, Europe, or Asia

  • Sales Date: The transaction date

  • Sales Amount: The amount of each transaction

  • Target Sales: The target amount for each transaction

Calculate "Sales Performance"and "Sales Gap"
Expression
Low: Sales Gap > 0High: Sales Gap <= 0
Rule Engine
Group: Region &Performance Status
Group Loop Start
Create file name based on"Region" & "Performance Status"
Variable Expression
String to Path (Variable)
Excel Writer
Variable Loop End
Readsales data
CSV Reader

Nodes

Extensions

Links