Verify that query processing is complete

Learn how to verify that processing has completed.

After you call the createQuery operation, Amazon receives the request and begins processing the query. Learn how to verify that processing has completed.

Step 1. Monitor the processing status

Periodically call the getQuery operation, passing the queryId value you received from createQuery, until the response contains a processingStatus value of one of the following:

  • CANCELLED
  • DONE
  • FATAL

The response also includes one of the following:

  • A dataDocumentId value if data is available as a result of the query.
  • An errorDocumentId value if there is an error while processing the query.
  • Neither of these when there is no data returned as a result of processing the query.

If processingStatus is IN_PROGRESS or IN_QUEUE, then processing has not ended, and you should continue to poll the getQuery operation until processingStatus is CANCELLED, DONE or FATAL.