Run a pipeline in a "while" loop.

Parameters:
Developer mode: activate/deactivate code tab.
Pipelines to run inside a loop Select the pipeline to execute each iteration.
Optional: global Loop Params Click … to seed the loop with initial Global Parameters. Use key=value rows.
Global Parameters to pass to the pipeline (comma-separated) Comma-separated list of GP names to forward to the inner pipeline. (Only these are guaranteed to be passed through.
**Loop continues while Returned ErrorLevel "e" is:**JavaScript-style boolean. Defaults to ((e==0) || (e==1)).
You can use:
e – the inner pipeline’s last ErrorLevelClear the value of all Global Parameters before running the pipeline Toggle on to start each iteration with a clean GP scope.
Add an iteration counter Adds an integer counter GP that increments every iteration.
Iteration counter name Name of the counter GP (default: gpcounter)
Silent Mode Suppresses most log messages from this action.
Verbosity of messages in the log
silentnormallogs of executed pipelines (includes the child pipeline logs; useful for debugging)See dedicated page for more information.
whileLoopPipeline is a scripted action. Embedded code is accessible and customizable through this tab.
See dedicated page for more information.
Run a pipeline in a while loop.
The action repeatedly executes a child pipeline and keeps looping while a test expression evaluates to true.
whileLoopPipeline runs another pipeline (the inner pipeline) again and again. After each run, it evaluates a JavaScript-style boolean expression (the Test string). If the expression returns true, the loop continues; otherwise it stops.
By default it continues while the child’s ErrorLevel (e) is 0 (success) or 1 (warning).
true → run another iteration.false → stop and return the last ErrorLevel e.e ≥ 2) and your test doesn’t explicitly allow it, the loop stops and propagates that error.Handy test examples
((e==0) || (e==1))gpcounter < 5(hasMore == 'yes')(hasMore == 'yes') && (gpcounter < 100)gpcounter.gpcounter < 3 (for three iterations).This pattern is great for batch/queue work:
In the child pipeline, return:
e = 1 when there is more work to do,e = 0 when all done.In whileLoopPipeline, keep the default test ((e==0) || (e==1)) or set it to e==1 if you want to continue only while work remains and stop on e==0.
(Optional) Add a counter and cap it:
((e==1) && (gpcounter < 100)) to prevent infinite loops.
Click … in Optional: global Loop Params and add rows like:
bucket=my-etl-demo-bucket
region=US
In Global Parameters to pass…, list the names you want the child to receive, e.g.
bucket, region
Decide whether to toggle Clear GPs each iteration (on = clean state; off = accumulate state across runs).
ErrorLevel of this action = the last iteration’s e (or the error that stopped the loop).
Global Parameters:
When logs of executed pipelines is chosen, child logs appear inline under this action.
gpcounter < 1000 avoids accidental infinite loops.normal after debugging.&& gpcounter < N while debugging.((e==0) || (e==1))).