Six Stars

Job orchestration and global vars with iterations

I created this sample job which has multiple flow to iterate components and iterations are set to 40 and 2

 

Question; can I trust that the globalVar which is set in subjob1 will be the same in subjob2? or could it be a different one caused by the number of concurrent iterations?

 

 

Screenshot from 2017-07-11 10-51-35.png

-----------------------------------------------------------------------------------------------------------
When you like my answer, please accept it as solution and send some kudos
  • Data Integration
1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: Job orchestration and global vars with iterations

Hi
You can set the key with the current iteration number, eg:
"Key"+((Integer)globalMap.get("tFlowToIterate_1_CURRENT_ITERATION"))
It ensures the global var is always the same in subjob1 and subjob2 even though you use concurrent iterations.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
1 REPLY
Community Manager

Re: Job orchestration and global vars with iterations

Hi
You can set the key with the current iteration number, eg:
"Key"+((Integer)globalMap.get("tFlowToIterate_1_CURRENT_ITERATION"))
It ensures the global var is always the same in subjob1 and subjob2 even though you use concurrent iterations.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business