I have a talend mapping which needs to be executed based on a ID. I want to pass the ID as a parameter. The mapping should execute for one ID at an time. I want to loop the execution for each ID one after the other. This can be achieved in SSIS using the For Loop Container. Can anyone help me finding out the equivalent for the same in Talend Open Studio.
Thanks in advance.
You can use the analogue tForeach component, and set the ID's values inside it. After that, you should connect the iterate output and reference the current value with the variable ((String)globalMap.get("tForeach_1_CURRENT_VALUE"))
where the tForeach_1
is the name of your tForeach component.
And set the Query to something like:
"select id, name from employee
where id="+((String)globalMap.get("tForeach_1_CURRENT_VALUE"))