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: 
JY3
Contributor
Contributor

would you please advise how to set "loop xpath query"?

Hi experts,

I'm new on Talend. I'm trying to run REST API but I couldn't figure out what is "loop xpath query" for below data.

200||{"data":[{"id":63131,"name":"ea","enable":true}],"meta":{"pagination":{"total":1,"count":1,"per_page":100,"current_page":1,"total_pages":1,"links":{}}}}

Below is my setting.

0695b00000bHjmMAAS.png

0695b00000bHjiaAAC.png

but it doesn't return any data output as below.0695b00000bHjfRAAS.png

Would you please advice me how I can set "loop xpath query"?

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

set the xpath query as "name" rather than "/name".

file metadata created in repository ​can be used directly on component instead of inputting the component settings manually, it is easy for you to maintain.

 

0695b00000cdtbWAAQ.png

View solution in original post

4 Replies
Anonymous
Not applicable

Hi

set the Loop xpath data as "$.data[*]" and set the xpath query as "name". As a newbie, go to Repository-->metadata-->File Json, create a file json metadata following the wizards.

 

Regards

Shong

JY3
Contributor
Contributor
Author

Hi Shong,

I set this up but it still doesn't work. Is it because I didn't set File Json? I tried to do it but I was not able to add because I don't know what value to enter. Do I have to add File Json in metadata to make this working?

 

0695b00000cdsaXAAQ.png 

0695b00000cdsamAAA.png 

Anonymous
Not applicable

set the xpath query as "name" rather than "/name".

file metadata created in repository ​can be used directly on component instead of inputting the component settings manually, it is easy for you to maintain.

 

0695b00000cdtbWAAQ.png

JY3
Contributor
Contributor
Author

Yes, it's working now. Actually, it was because of JSON Field. I don't know why but the contents were in "string" not a "body". Thank you for the kind and quick advice.