4

I am attempting to use the rest client to query a webservice for data. The flow is as follows:

  1. POST request with the query that returns a cursor Id (Get Initial Cursor)
  2. GET request with the cursor ID to retrieve the first batch of 5000 rows
    • Along with the data, the response contains the next and previous cursor id (Extract Cursor Id, Get data with cursor)
  3. Use the next cursor from the request in step 2 to get more data and possibly another next cursor.
  4. If next cursor is missing from the response, no more data is available.

What is the best way to implement a looping construct to keep retrieving data till 'next cursor' is unavailable?

Below is the diagram of my transformation:

Transformation Diagram

Shoan
  • 4,003
  • 1
  • 26
  • 29

0 Answers0