Is there a way for my app to be notified when the query job is completed as opposed to calling the GET /job endpoint? Dremio’s browser interface to preview and run queries, available on http://localhost:9047, seems to be notified when executing queries because it is not polling the “job” endpoint. My app, on the other hand, calls the “job” endpoint lots of times, potentially loading the server and slowing down other processes.
This is how my app is executing Dremio queries:
-
This call sends the query to execute
POST http://localhost:9047/api/v3/sql -
This call checks for the status of the job until its state is “COMPLETED”
GET http://localhost:9047/api/v3/job/24e8a8e9-6e53-4a81-33af-6886aea003 -
This call retrieves the results
GET http://localhost:9047/api/v3/job/24e8a8e9-6e53-4a81-33af-6886aea00300/results?offset=0&limit=499
Thanks!