tLoop example - Cloud - 7.3

Talend Job Script Reference Guide

Version
Cloud
7.3
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Cloud
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend CommandLine
Talend Studio
Content
Design and Development > Designing Jobs
Last publication date
2023-09-13

In the following example, a WHILE loop is defined to run until the number of instances reaches 6, and the instance number increments by 2 at each iteration. As a result, the task execution is triggered at every even-numbered instance and the task will be executed three times automatically.

	setSettings {
		FORLOOP : "false",
		WHILELOOP : "true",
		DECLARATION : "int i=0",
		CONDITION : "i<6",
		ITERATION : "i=i+2"
	}