I am trying to post the CSV file data to TRestClient in json format.
I am able to post the data to Rest service using TXML map, but it is working only for one row (i.e, if have 100 records in my csv then rest service is being called 100 times by TRestClient).
I need to pass the entire data in one single call to rest service. I have attached the screenshot of the job that I have made.
I would really appreciate any help in this regard.
I am making some assumptions here. First that your XML is configured correctly in the tXMLMap. The second is that your XML has a looping section that will loop per row fed into it. If this is the case, you need to click on the spanner in the tXMLMap output table and set "Allin one" to true. This will produce one XML document and send it to your tRestClient.
I have csv file in input and parsing the data in xml using TXmlMap.
Please tell me, From where i can set 'Allin true' options from the following screen.
I am new in talend.
You need to click the spanner symbol in the yellow block where your "aa" output schema is. However, I can see that your XML schema is not configured at all. I sense you have quite a few more hurdles here. You need to create your XML schema and assign your looping element.
Thanks, this solution is working for me.
One more question, can we pass JSON list to TRestClient?
Yes JSON can be passed to a tRestClient. You have to remember that JSON is a String and not a Document. That is the mistake that most people make when trying to use JSON. Would you mind accepting the post that pointed you in the right direction as the solution to this please? It helps point people also struggling with the same issue, in the right direction. Thanks :-)
Talend named a Leader.
Kickstart your first data integration and ETL projects.
An integration platform-as-a-serviceto help enterprises collect, govern, transform, and share data from any data sources
Move from On-Premises to the Cloud by following the advice of experts
Learn how to deploy Talend Jobs as Docker images to Amazon, Azure and Google Cloud registries