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: 
pthomas
Contributor III
Contributor III

tRest - resume next

I have a loop that pulls a list of ids and executes a tRest api for each id.  This works until it doesn't.

When it works it brings back json with it's Body and ERROR_CODE columns.  From there I can troubleshoot any data.  But occasionally it brings back a random xml that I can't even capture.  It fails the trest component with a error...

"Too many "Content-Type" header values: "[text/xml: charset="utf-8", null]"

Is there a way that when the api blows up, I can do a resume next or any continue to the next iteration?

 

Labels (4)
1 Solution

Accepted Solutions
Shicong_Hong
Employee
Employee

Hello 

Move the tRest component to a child job, iterate each id and pass the current id to child job, please refer to https://community.qlik.com/t5/Official-Support-Articles/Passing-a-value-from-a-parent-Job-to-a-child...

In the main job, use a tRunJob to run the child job and uncheck the 'Die on child error' option.

Let me know if you have any questions/issues.

Regards

Shicong

 

View solution in original post

1 Reply
Shicong_Hong
Employee
Employee

Hello 

Move the tRest component to a child job, iterate each id and pass the current id to child job, please refer to https://community.qlik.com/t5/Official-Support-Articles/Passing-a-value-from-a-parent-Job-to-a-child...

In the main job, use a tRunJob to run the child job and uncheck the 'Die on child error' option.

Let me know if you have any questions/issues.

Regards

Shicong