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 ?
Eleven 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!

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.