cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to loop through data from a file... like an csv?

swright
New Contributor III

I have a csv file with person ID numbers in one column. I need to use the id number to act on person records in the cloud via REST.

What is the best way to setup a pipeline to get an ID, do some processing, then execute a REST snap, then go back and do the same for the next ID and continue looping through the IDs?

Thanks,
Scott

1 ACCEPTED SOLUTION

sg_sripathi
New Contributor III

@swright, if you refer to below pipeline. It will make two REST API call to two different end point (URL constructed using input) and with HTTP body content as you see in the example. So basically the REST snap will take care of processing each document for you.

image

View solution in original post

11 REPLIES 11

@sg_sripathi , I’m curious what your csv parser setup looks like. Would you mind posting that, or the pipeline export please?

lokey
New Contributor II

@acesario it’s as simple as dragging ang dropping the csv parser snap on this example as the data is comma separated which is by default set on snap.

If there are any other separators or if may want to include or remove header then below is the docbase link for more information on the snap configuration.
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438538/CSV+Parser