read csv, post json to REST API

One Star

read csv, post json to REST API

newbie to TOS (5.3) familiar with json and REST
big picture... i'm trying to read a csv, convert each record to json and call a rest api to insert.
if someone had an example
1. authenticate and get access token
2. read/process a CSV record (don't need help here, got this working well)
3. POST the JSON
4. Read response, if FATAL end, else read next
http://sberyozkin.blogspot.com/ very helpful, but couldn't extrapolate from a single request into a job to process n rows and POST 1 at a time.
thanks for reading.
Employee

Re: read csv, post json to REST API

Hi rquinn,
the tFlowToIterate (behind the reading of the CSV file and before your tRESTClient component) might be the component of choice for you to get a request for each individual CSV record.
HTH,
Dietmar
One Star

Re: read csv, post json to REST API

Thanks Dietmar.
Highlighted
One Star

Re: read csv, post json to REST API

Tags:
newbie to TOS
big picture... i'm trying to call a rest service that returns a csv like response and than process the response and put it in a MongoDB .
What is the best way so I can read the response as a stream and walk through the lines , map to the a document to put in a MONGO DB ?
if someone had an example of the first part ( reading and parsing the CSV stream ) it would be great
thanks for reading.

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

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

Definitive Guide to Data Quality

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

Download