athena-query
v1.0.6
Published
Query AWS Athena
Downloads
11
Readme
athena-query
Usage
npm i athena-query
@aws-sdk/credential-providers and @aws-sdk/client-athena are required as peer dependencies, make sure to install them as well.
import { query } from 'athena-query'
const [columns, rows] = await query('select * from yourtable')
// with options
const [columns, rows] = await query('select * from yourtable', {
region: 'us-east-1',
output: 's3://yourbucket/athena-query-results',
backoff: 2000 // milliseconds
})
Options
region
- AWS regionprofile
- AWS profileworkgroup
- Athena workgroupoutput
- S3 bucket to store query resultsbackoff
- Backoff time in milliseconds