RVandakar
RVandakar

Reputation: 81

While loop implementation in Pentaho Kettle

I need guidence on implementing WHILE loop with Kettle/PDI. The scenario is

(1) I have some (may be thousand or thousands of thousand) data in a table, to be validated with a remote server.

(2) Read them and loopup to the remote server; I use Modified Java Script for this as remote server lookup validation is defined in external Java JAR file (I can use "Change number of copies to start... option on Modified java script and set to 5 or 10)

(3) Update the result on database table. There will be 50 to 60% connection failure cases each session.

(4) Repeat Step 1 to step 3 till all gets updated to success

(5) Stop looping on Nth cycle; this is to avoid very long or infinite looping, N value may be 5 or 10.

How to design such a WhILE loop in Pentaho Kettle?

Upvotes: 0

Views: 13348

Answers (1)

Dezzie
Dezzie

Reputation: 984

Have you seen this link? It gives a pretty well detailed explanation of how to implement a while loop.

You need a parent job with a sub-transformation for doing a check on the condition which will return a variable to the job on whether to abort or to continue.

Upvotes: 2

Related Questions