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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
fjblau
Contributor
Contributor

tRest input only getting last value

I have cascading Rest API's that I need to call... the first API call returns 10 rows with id's that I need to pass to the second API call.

 

A tLogRow shows all 10 id's being output correctly.

 

I then used the technique of setting a globalMap value with 

 

globalMap.put("id", input_row.id);

 

and then using that globalMap in the next tRest API.

 

The problem is that it only lets me connect with a "On Component OK" trigger, and it is only doing the LAST id query in the tRest object.

 

How can I get it to iterate on those ID's and not just run the last one?

Labels (3)
1 Solution

Accepted Solutions
vapukov
Master II
Master II

Hi

 

you need to use tFlowToIterate, it will store each id into the variable and do following steps one by one iteration 

https://help.talend.com/reader/wDRBNUuxk629sNcI0dNYaA/WqJCkTE5~5DDaSFvtNXZnQ

View solution in original post

3 Replies
vapukov
Master II
Master II

Hi

 

you need to use tFlowToIterate, it will store each id into the variable and do following steps one by one iteration 

https://help.talend.com/reader/wDRBNUuxk629sNcI0dNYaA/WqJCkTE5~5DDaSFvtNXZnQ

fjblau
Contributor
Contributor
Author

That is awesome, thanks!

 

I got something to work like that using a tJavaFlex too... but is there a performance difference between them?  I can definitely see the tFlowIterator being easier to read!

vapukov
Master II
Master II

no difference in speed as I know (or it extremely low)