Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
dan-rosen
Contributor II
Contributor II

Parsing JSON Data from a series of REST calls

Hello,

 

I am trying to build a job that can make a series of HTTP requests using the REST client to a dynamic list of endpoints and return that data in usable JSON format.

 

I have a list of employee numbers, and the endpoints I need to hit are different for each employee number. I have been able to iterate over a series of values and log out the response for each of these requests, and the data seems right, but they all come back as separate responses.

 

Would anyone be able to explain how to set this up so that the data from the different responses can become one single data file?

 

Thanks in advance!

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Extract data from each response using tExtractJsonField and store them into memory using tHashOutput. In next subjob, read all data from memory using tHashInput, re-write a Json string and output it to a file.

Regards
Shong

View solution in original post

2 Replies
Anonymous
Not applicable

Extract data from each response using tExtractJsonField and store them into memory using tHashOutput. In next subjob, read all data from memory using tHashInput, re-write a Json string and output it to a file.

Regards
Shong

dan-rosen
Contributor II
Contributor II
Author

Thanks Shong, that's a good suggestion. I was actually able to solve my issue by writing the data to a database in each iteration (or alternatively storing in a temp file), but it sounds like your solution will work better in a job that requires work to be done on this combined data set, so I will give that a shot at some point as well.