Icon

05 Loops

05 Loops
Exercise: Generic LoopCreate a generic loop that generate random extra days.1.1) Read the WA_FN-UseC-IT-Help-Desk data, and filter out rows where the filed against type is"access/login".1.2) Start a generic loop with the Generic Loop Start node1.3) Create a new flow variable "extra day" by adding 1 to the currentIteration flow variable. Filterthe data to the days open that are equal to extra day1.4) Calculate the extra days by multiplying the extra days flow variable by 21.5) Filter the results to rows where the extra days <= 201.6) Extract the number of rows as a flow variable. Use the Extract Table Dimension node.1.7) Use the Variable Condition Loop End node to stop the loop after 10 iterations. Exercise: Group LoopCreate a group loop that replaces 0 days opened with the average days opened for the same fileagainst type and severity:1.1) Execute the preprepared workflow that accesses and preprocesses the WA_FN-UseC-IT-Help-Desk data 1.2) Start a group loop where each subgroup is defined by the severity and filed against type1.3) Split the data into two subsets: days opened=0 and days opened>01.4) Calculate the average days opened of the severity in the latter group1.5) Transform the average days opened into a flow variable1.6) Replace the 0 days opened with this flow variable value. Use the Constant Value Columnnode.1.7) Concatenate the two subsets back into one table1.8) End the loop with a Loop End node WA_Fn-UseC-IT-Help-Desk.csvRemove rowswith missing valuesin group columnsseverity &filed againsttop: days open = 0bottom: days open > 0average days openreplace days open = 0w/ average days openWA_Fn-UseC-IT-Help-Desk.csvextra day open = current iteration + 1stops loop when # of rows = 0extra dayfiled against: access/logincalculate randomnessdays open<= 20 CSV Reader Missing Value Group Loop Start Row Splitter GroupBy Table Rowto Variable ConstantValue Column Concatenate Loop End CSV Reader Math Formula(Variable) Generic Loop Start Variable ConditionLoop End Extract TableDimension Row Filter Row Filter Math Formula Row Filter Exercise: Generic LoopCreate a generic loop that generate random extra days.1.1) Read the WA_FN-UseC-IT-Help-Desk data, and filter out rows where the filed against type is"access/login".1.2) Start a generic loop with the Generic Loop Start node1.3) Create a new flow variable "extra day" by adding 1 to the currentIteration flow variable. Filterthe data to the days open that are equal to extra day1.4) Calculate the extra days by multiplying the extra days flow variable by 21.5) Filter the results to rows where the extra days <= 201.6) Extract the number of rows as a flow variable. Use the Extract Table Dimension node.1.7) Use the Variable Condition Loop End node to stop the loop after 10 iterations. Exercise: Group LoopCreate a group loop that replaces 0 days opened with the average days opened for the same fileagainst type and severity:1.1) Execute the preprepared workflow that accesses and preprocesses the WA_FN-UseC-IT-Help-Desk data 1.2) Start a group loop where each subgroup is defined by the severity and filed against type1.3) Split the data into two subsets: days opened=0 and days opened>01.4) Calculate the average days opened of the severity in the latter group1.5) Transform the average days opened into a flow variable1.6) Replace the 0 days opened with this flow variable value. Use the Constant Value Columnnode.1.7) Concatenate the two subsets back into one table1.8) End the loop with a Loop End node WA_Fn-UseC-IT-Help-Desk.csvRemove rowswith missing valuesin group columnsseverity &filed againsttop: days open = 0bottom: days open > 0average days openreplace days open = 0w/ average days openWA_Fn-UseC-IT-Help-Desk.csvextra day open = current iteration + 1stops loop when # of rows = 0extra dayfiled against: access/logincalculate randomnessdays open<= 20 CSV Reader Missing Value Group Loop Start Row Splitter GroupBy Table Rowto Variable ConstantValue Column Concatenate Loop End CSV Reader Math Formula(Variable) Generic Loop Start Variable ConditionLoop End Extract TableDimension Row Filter Row Filter Math Formula Row Filter

Nodes

Extensions

Links