Athena-Express can simplify executing SQL queries in Amazon Athena AND fetching cleaned-up JSON results in the same synchronous or asynchronous request - well suited for web applications.
I need to run a few fairly lengthy queries so I've created an endpoint that triggers the query to run.
I run it with a config like { skipResults: true, waitForResults: false } and get back the QueryExecutionId.
I'd like to store the QueryExecutionID and then be able to basically run athenaExpress(queryExecutionId) every N seconds with a config along the lines of
{
getStats: true,
skipResults: true
}
So I can get the S3Location back from getStats and do what I need to do with it (rename, presign etc.) But I haven't figured out a way to just get the S3Location without it also trying to send back all the data (which is a few hundred MB in this case.
I'm sure I can use the QueryExecutionId along with the AWS SDK to make it work, but wanted to make sure I'm not missing something already existing in athena-express.
I need to run a few fairly lengthy queries so I've created an endpoint that triggers the query to run.
I run it with a config like
{ skipResults: true, waitForResults: false }
and get back the QueryExecutionId.I'd like to store the QueryExecutionID and then be able to basically run
athenaExpress(queryExecutionId)
every N seconds with a config along the lines ofSo I can get the
S3Location
back fromgetStats
and do what I need to do with it (rename, presign etc.) But I haven't figured out a way to just get theS3Location
without it also trying to send back all the data (which is a few hundred MB in this case.I'm sure I can use the QueryExecutionId along with the AWS SDK to make it work, but wanted to make sure I'm not missing something already existing in athena-express.