SQL Job API - having to run in loop as there is no callback

Hi Team,

I am using REST API of Dremio (SQL API) - Dremio to fetch dataset for my UI application (ReactJS).

Everything works fine except the fact that I have to keep calling(in loop) the Job API to know the status of the SQL JOB until it is completed, this is doesn’t seem efficient way as I am hitting the Dremio server continuously until I receive “COMPLETION” status.

Also my custom UI has a grid with pagination. so for every pagination, I have to execute the above.

Please suggest if there is any long polling or webhooks or any other solution to resolve the above.

or would you suggest to use to ODBC to create a custom web api?

Thanks,
Santosh

For REST API polling is your only option, we don’t have any webhooks or websocket support currently.

ODBC could work for you, but would require you to host your own APIs to communicate with the ODBC endpoint.

1 Like

The Flight endpoint might be an option here. You could use the gprc-js client to issue requests and then the Arrow JS library to interpret the data.