Im passing request body row by row in trest .But Im getting only response from the final row from trest .

Five Stars

Im passing request body row by row in trest .But Im getting only response from the final row from trest .

my  content in tfileinput delimited

{"q":"1-10"}
{"q":"7-36"}

{"q":"8-36"}

 

If am passing the content in first row in trest as POST , tRest provides me with the response.

But final row response replaces the preceding rows response , thereby only the final row response is stored.

How to carry responses for all the rows in loop from tRest .

trest.PNG

 

If you see the above image , after tRest , only one row is getting processed. how should I process all the rows and take the required fields from the response.

 

@TRF @fdenis @rhall

Five Stars

Re: Im passing request body row by row in trest .But Im getting only response from the final row from trest .

When i use tlog row , I could get the responses from all rows . Now Pls guide me in how to extrarct all the responses from tRest

Eight Stars

Re: Im passing request body row by row in trest .But Im getting only response from the final row from trest .

It looks like everything is configured correctly, especially since you can see all rows in the tLogRow.  Each time you iterate then pass the extracted JSON to the file, you are effectively overwriting the previous record written there.  This is why you are only seeing the last record, because it overwrote the previous one

Five Stars

Re: Im passing request body row by row in trest .But Im getting only response from the final row from trest .

Why does it getoverriden , when each row is processed , I expected all the responses getting into the file one by one . That’s how it should behave right ?
Twelve Stars

Re: Im passing request body row by row in trest .But Im getting only response from the final row from trest .

I thing you have to use tFilexxx or tHashxxx to store each responses.
before the end of the process.
you can also add one tFlowToIterate and one tIterateToFlow to group iteration result after tRest

Francois Denis

Tag as "solved" for others! Kudos to thanks!

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads