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.