Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Post request to Rest Client from data from csv file as JSON

0683p000009M822.png

 

Hello Everyone,

 

I'm new to Talend just learning how to use the the components.

this is use case csv -> map -> json -> rest api

 

For the components, I implemented like this

 

tFileInputDelimited -> tMap -> tFileOutputJson . I got the JSON I needed

 

CSV file :

 

id,source,date,dataType,value
1,/source1,2013-12-07 05:43Z,2,1.068
2,/source2,2013-12-07 06:23Z,1,12345678

 

JSON body request should be something like this:

 

[

{

"id":1,

"source":"/source1",

"date": "2013-12-07 05:40Z",

"dataType":2,

"value":1.09

}

]

now how to send the json to rest api as request?

 

Labels (5)
1 Reply
Aravind_Ravi
Contributor III
Contributor III

You dint have to save the JSON as a file. There is one more simple way you can create the JSON post it into rest API and extract the Response

 

PFA the Screenshot. I have a sample workflow that shows how you can achieve it.

 

If this is what you are looking for then, Press the "Accept as Solution " Button and Give a Kudos.

Thanks,
AR


post_josn_rest.png