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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Loop not working on REST service output

Hi -

 

I am trying to execute a REST client that returns looped row data. I want to input this data to a database.

However it seems that the tXML item is not looping the data element

0683p000009LvLQ.png0683p000009LvAT.png

 

Labels (6)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

That is not the default, I had to configure it to get the body message.

How would a loop example look, as my main states loop for the root element?

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Your XML structure does not look like it has any legitimate XML loops

Anonymous
Not applicable
Author

There is a loop on the main. should I do the same for the output?


Anonymous
Not applicable
Author

That is not a loop. That is a default configuration that Talend uses. The XML structure does not look like it supports loops properly.

Anonymous
Not applicable
Author

That is not the default, I had to configure it to get the body message.

How would a loop example look, as my main states loop for the root element?

Anonymous
Not applicable
Author

What I meant was this (circled) is a default Talend config......

0683p000009LvGl.png

 

In order to return multple rows you will need to put that "loop" config on an element which is the parent of a looping section.

 

However, it doesn't look like your XML is looping. I would expect something like below from a looping xml....

<root>
<cmdb_id></cmdb_id>
<status></status>
<datas>
<data>
<bytes_in></bytes_in>
<bytes_out></bytes_out>
<bytes_total></bytes_total>
<ip></ip>
</data>
</datas>
</root>

Look at the "datas" (sorry, a bad plural for data) element. It contains a complex type that is looping. A loop needs a container in good XML.