You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It offers great features, however, we hit a glitch using node-athena on that kind of query.
The "outputLocation" received in the response is not pointing to the csv result or the metadata file.
Instead, the response is s3://[bucket_name]/[path]/[query_id] without the file extension.
When running this kind of queries with node-athena, we hit an error as the s3 key does not exists.
The key: s3://[bucket_name]/[path]/[query_id] doesn't exists.
Only the .metadata file is generated.
We have been able to patch the lib so it can handle this kind of query.
I'm not a coder, so i'm not pretending my patch is how we should handle things.
I just changed a few lines of code in one file (client.js):
Adding a new property in the client config:
export interface AthenaClientConfig extends AthenaRequestConfig {
pollingInterval?: number
queryTimeout?: number
concurrentExecMax?: number
execRightCheckInterval?: number
noResultExpected?: boolean
}
NB: noResultExpected?: boolean added
Adding a condition for not trying to access the CSV file in that case:
Hello,
First of all, big thanks for your great work on that lib, we are using it and it works like a charm.
AWS has released an update a few weeks back for what they call CTAS queries:
https://docs.aws.amazon.com/athena/latest/ug/ctas.html
It offers great features, however, we hit a glitch using node-athena on that kind of query.
The "outputLocation" received in the response is not pointing to the csv result or the metadata file.
Instead, the response is s3://[bucket_name]/[path]/[query_id] without the file extension.
When running this kind of queries with node-athena, we hit an error as the s3 key does not exists.
We have been able to patch the lib so it can handle this kind of query.
We have a compiled working version available at:
https://github.com/jubry/node-athena
I'm not a coder, so i'm not pretending my patch is how we should handle things.
I just changed a few lines of code in one file (client.js):
NB: noResultExpected?: boolean added
NB: if (!config.noResultExpected) { added
By doing that, we are able to keep using your library.
Would it be possible for you to implement such functionality in a proper way ?
It would be greatly appreciated.
Find here an sql statement to reproduce the problem:
Let me know if you have any question about it.
Thanks in advance,
And again, congratulation for your great work.
Regards,
:)
The text was updated successfully, but these errors were encountered: