Different ways of implementing loop in PDI
We come across certain scenarios where in running of the Job/Transformation in loop becomes necessary in Pentaho. Below are the different ways of implementing the loop to the Job in PDI.
1. Using Execute for every input row
Build a job, and let the first transformation retrieve all the rows via Table Input. Use a “Copy rows to result” step to save the result. Create a second transformation configured for single row execution – refer the image advanced transformation settings. Use “Get rows from result” to start single row processing.
2. Use simple evaluation step
-
Get the number of count for the loop
-
Assign the count to a variable.
-
Call the variable in the simple evaluation step( as shown in the figure below)
-
Give the appropriate condition according to the requirement.
-
Connect the hop to the job which has to run in a loop.
Best Open Source Business Intelligence Software Helical Insight is Here