cancel
Showing results for 
Search instead for 
Did you mean: 

Recursive logic in Snaplogic

sravankunadi
New Contributor II

The pipeline was failing in production because it was calling the child pipeline for more than 64 times.
Do we have any workaround for this approach

11 REPLIES 11

koryknick
Employee
Employee

@sravankunadi - to make pagination a bit easier, I recommend that you build the complete URL, including the query parameters (except “offset”) in a Mapper just before the REST Get. This might take just a bit of testing to work out the correct syntax of the “root” element.

Then the REST Get properties could be set as follows:

  • Has Next: $entity.result.length == 200
  • Next URL: $original.url + “&offset=” + parseInt($entity.result.length) -1

Unfortunately, if the API doesn’t return a “next url”, you will need to build the full URL for the Next URL value.

Since I can’t call your service, I’m not able to replicate the folder pagination; and because I don’t have a Marketo instance with a large number of folders, I can’t provide a sample pipeline for you.

Hope this helps point you towards a solution!

koryknick
Employee
Employee

By the way - there is a Marketo snap pack that would let you easily list the Folder contents (as well as many other functions) - you may want to contact your SnapLogic CSM (Customer Success Manager) to ask about a trial in your dev org to see if this would work for your use case.