Closed jrbarnard closed 4 years ago
Not sure if this is a valid scenario as athena-express waits until the query is finished executing and it does so by checking every 200 milliseconds (default value) on the query status. Furthermore, if you don't care about fetching the results immediately, you can set skipResults: true
and use the returned values of QueryExecutionId
& S3Location
to fetch results later on demand
The use case would be if your request / execution times out (Lambda timeout / api gateway 30 second max request time) before it's exited the Athena express query method. If you then retry the same request it will start a new query rather than be able to pick up where it left off.
Athena's max query time is 30 minutes by default and depending on the time of day multiple minute queue / query times are realistic.
oh ok. Let me look into it.
This can now be achieved by setting waitForResults: false
in the athena-express configuration. This will return a QueryExecutionId
as soon as the query begins. You can then pass QueryExecutionId
back into athena-express some time later.
If the service running the query times out before the query finishes running / gets off the queue, if it retries it will re start the query. Ideally we'd be able to set the ClientRequestToken through athena express to make an idempotent request.
Suggested syntax:
I'm happy to PR this, cheers