Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Run If, update and commit in the same iteration

Hello,
I'm kind of new with Talend. And I have a problem with an update and a commit inside an iteration.
Here's my diagram

As you can see I have a tOracleInput to start the iteration, and after a tJavaRow, tOracleRow and a tJavaRow. Here the subjob ends. If the Run If is true after tJavaRow_3 I make an update and a commit, and I need to do this for every iteration of the tOracleInput. But it seems that the update and the commit are done after all the iterations ended, i mean, they're executed only for the last row of the iteration.
Can anyone help me please.
Labels (3)
4 Replies
Anonymous
Not applicable
Author

looks like your images are missing. if you can upload the images Im sure we can assist
Anonymous
Not applicable
Author

Thank you JohnGarrettMartin for your answer, 
I uploaded them.
I don't know what happened.
0683p000009MDsY.png
Done it. Yeah!!!
Anonymous
Not applicable
Author

"if" links are evaluated during the END section of a component -- so they are not checked per-row as you expect in the job. 
a simple fix for this is to insert a tFlowToIterate component between your initial select and tJavaRow_2. Then you would connect this to the rest of the job using the "iterate" link. 
tFlowToIterate puts the row values in the globalMap for each iteration-- by default it uses the pattern for the globalMap keys: <row name>.<columnName> so an example call would look like:
context.curr_row_value = (String)globalMap.get("row9.columnName");
Anonymous
Not applicable
Author

"if" links are evaluated during the END section of a component -- so they are not checked per-row as you expect in the job. 
a simple fix for this is to insert a tFlowToIterate component between your initial select and tJavaRow_2. Then you would connect this to the rest of the job using the "iterate" link. 
tFlowToIterate puts the row values in the globalMap for each iteration-- by default it uses the pattern for the globalMap keys: <row name>.<columnName> so an example call would look like:
context.curr_row_value = (String)globalMap.get("row9.columnName");


Thank you JohnGarrettMartin!!!!
It works perfectly.
Thank you.