Forum Discussion

jhagist's avatar
jhagist
New Contributor III
8 years ago
Solved

Rest API Test For Completion

I have a pattern where I run a REST POST api call and then need to run a REST GET to see if the request has completed. I need to somehow loop back to run the REST GET again if it isn’t done. Recom...
  • ptaylor's avatar
    4 years ago

    Hi Wassim,

    This is actually a known issue (SWAT-3096) that we’re working on a fix for. It happens when there are at least 1024 records being copied by the Copy snap, for reasons that are a bit difficult to explain.

    Until we have a fix, there are at least three workarounds:

    • Swap the order of the inputs to the Lookup snap, so that the output of the Aggregate is the first input rather than the second.
    • Insert a Sort snap right after each output of the Copy snap. It won’t work if you put the Sort before the Copy. In this workaround, the point of the Sort snaps isn’t to sort the data, which might already be sorted – it’s to essentially create independent buffers of the data from each of the Copy snap’s output views.
    • Replace the Lookup with a Join, and set the Sorted streams property to Unsorted.