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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Parikhharshal
Creator III
Creator III

API URL null

 Hi Talend experts


I have got below job which reads next API URL until it finds one also it iterates for different course_ids. I have tweaked the design a bit to run parallel execution(the idea is to use parallel execution option of iterate) to execute multiple calls at a time.

0683p000009M0rT.png

 

StoreCourseID:
//globalMap.put("canvas_id", row1.canvas_id);
globalMap.put("V_API_URL" + row1.canvas_id, "https://swinburneonline.instructure.com/api/v1/courses/"+row1.canvas_id +"/analytics/student_summaries?per_page=100");
globalMap.put("V_LOOP"+ row1.canvas_id, true);

tLoop:
((Boolean) globalMap.get("V_LOOP"+ row1.canvas_id))

tRestClient:

((String) globalMap.get("V_API_URL" + row1.canvas_id))

GetNextUrl
System.out.println("Current URL IS: "+globalMap.get("V_API_URL"+ row1.canvas_id)); (prints correctly)
System.out.println("Rest URL"+ globalMap.get("tRESTClient_1_HEADERS")); (doesn't print and errors out to null)
java.util.List <STRING> strList&nbsp; = ((java.util.Map<STRING>&gt0683p000009MEwU.pngglobalMap.get("tRESTClient_1_HEADERS")).get("Link");

 

SetNextURlToCurrUrl:

if ((Boolean) globalMap.get("V_LOOP"+row1.canvas_id))
; {
System.out.println("URL1 IS: "+globalMap.get("V_API_URL"));
globalMap.put("V_API_URL"+row1.canvas_id,globalMap.get("next_url"+row1.canvas_id));
System.out.println("URL IS: "+globalMap.get("V_API_URL"));

 

In doing so I have run into problem where Rest URL is always getting NULL when I get it from GetNextURL (tjava) component. Not sure what's wrong. Any help is really appreciated!

 

@rhall and @gr44: your input is really appreciated!!


Thanks
Harshal.

Labels (5)
10 Replies
Anonymous
Not applicable

I'm not sure. This *might* be a bug. I built a quick job like this....

 

tRowGenerator -------------------------------------> tFlowToIterate-------------------------> tJava

(Generating a single integer sequence) .       (Running 10 in parallel)                  (Printing the numbers)

 

This produced an output of .....

 

3

9

1

4

10

7

8

2

6

5

 

I extended the test to 100 with 100  in parallel and it still looked ok.....although I didn't spend too much time checking.

But I did this in v6.5.1. Try something similar and see if you get problems. If you do, it sounds like a bug in v6.4