create http request for each row of a table

Highlighted
Four Stars

create http request for each row of a table

Hi everybody !

I didn't find any clues for resolving my problem :

I have an input sql table, and for each line of this table, I'm trying to post http request and send the fields of my input sql table in the body of the http request without passing by parameter's file.

Thanks a lot !


Accepted Solutions
Community Manager

Re: create http request for each row of a table

We will need to know a bit more about the service before we can really help. However, as a starter you can use the tRestClient. It receives and body and string column. I assume that your service requires its body to be either XML or JSON. If it requires XML, then you need to create an XML document and pass it to the body. If it is JSON, you need to create a JSON String and pass it to the string column. 

 

Take a look here: https://help.talend.com/reader/hCrOzogIwKfuR3mPf~LydA/~V42EBQClKxKQghNvzHF1g

 

It actually has an example of a file being read and its data being passed to the tRestClient, which is similar to what you are describing.


All Replies
Community Manager

Re: create http request for each row of a table

We will need to know a bit more about the service before we can really help. However, as a starter you can use the tRestClient. It receives and body and string column. I assume that your service requires its body to be either XML or JSON. If it requires XML, then you need to create an XML document and pass it to the body. If it is JSON, you need to create a JSON String and pass it to the string column. 

 

Take a look here: https://help.talend.com/reader/hCrOzogIwKfuR3mPf~LydA/~V42EBQClKxKQghNvzHF1g

 

It actually has an example of a file being read and its data being passed to the tRestClient, which is similar to what you are describing.

Twelve Stars

Re: create http request for each row of a table

you may try to use tFlowToIterate.

Francois Denis

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

Four Stars

Re: create http request for each row of a table

Thanks a lot !

Using tRestClient solved my problem

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 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog