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

Thanks for your response @koryknick. Unfortunately we donโ€™t have anything that we can rely on Has Next and Next URL.
Here is the response from marketo for marketo folders API:

The topic Connecting to Marketo with the REST Snap Pack describes pagination int eh REST Snaps with Marketo.


Diane Miller
Community Manager

Thanks @dmiller. Pagination supports for activities but for the marketo folders there is no pagination that will support. Only the increment parameter needs to send as Offset untill it returns less than 200 this needs to go through loop

koryknick
Employee
Employee

@sravankunadi - what is the condition where you stop your recursion? That would be the same condition (or very similar) you would put in the Has Next property.

If I am reading the Marketo API specs correctly, you receive a โ€œnextPageTokenโ€ when there are more results. So the Has Next would simply be the existence of โ€œnextPageTokenโ€ element. Probably something like the following:

'nextPageToken' in $response

sravankunadi
New Contributor II

Sorry @koryknick if i am not clear on the requirement. We do not have anything nextPageToken for marketo folders extract and also we do not know when to terminate the process. if the records are less than 200 then we need to exit the job.

Marketo response on this:

We need to pass the offset as incremental parameter to fetch the records until the record count is less than 200. I have attached the pipeline in the above thread.