Forum Discussion
@swright, not sure why you would require a complex setup. Is the processing complicated to be had in a separate pipeline. Most of the snaps process at document level, so you don’t have to loop, including REST snaps.
- swright6 years agoNew Contributor III
Hi Sripathi,
I’m new to Snaplogic. I would love to have a simple setup. The CSV parser snap produces a json file with a separate array element for each id. I need to create endpoints for each ID to and pass the endpoints to REST snaps. It seems like I need to execute the REST snap once for each url that is created using the PersonNumber from the csv. In many programing languages this would be done using a loop. It would take the first PersonNumber, get/create the endpoints for the REST snaps and run the REST snaps then move on to the next PersonNumber and do the same with each PersonNumber until there are no more PersonNumbers in the array.
I don’t know how to do this. Are there any examples?
Thanks,
Scott
- sg_sripathi6 years agoNew 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.
- swright6 years agoNew Contributor III
Thanks Sripathi! That worked perfectly!
Scott