Skip to content

Releases

v4.0.0

Choose a tag to compare

@avegao avegao released this 19 Feb 16:21
v4.0.0
2e69ce2

What's Changed

Full Changelog: v3.0.0...v4.0.0

v3.0.0

Choose a tag to compare

@avegao avegao released this 21 Jun 11:16
v3.0.0
e0bb2e0

BREAKING CHANGES!!!

https://github.com/avegao/aws-athena-node-client?tab=readme-ov-file#upgrade-from-v2-to-v3

What's Changed

New Contributors

Full Changelog: v2.0.1...v3.0.0

v2.0.1

Choose a tag to compare

@avegao avegao released this 19 Mar 15:33
v2.0.1
14aa982

NPM package now has dist folder

Full Changelog: v2.0.0...v2.0.1

v2.0.0

Choose a tag to compare

@avegao avegao released this 18 Mar 17:20
v2.0.0
d9447c9
  • Upgraded to AWS SDK v3
  • Support for AWS Athena cache
  • ESM support
  • Use in AWS Lambda supported

Breaking changes

  • Dropped support for nodejs < v18

Upgrade from v1 to v2

  • Client class renamed to AthenaNodeClient to prevent issues with @aws-sdk/client-athena classes naming.
  • Now you must instance AthenaClient from @aws-sdk/client-athena package. This is to optimize support for AWS Lambda
    functions (@aws-sdk/* packages are included in AWS Lambda runtime), use the most updated version of this
    package in your project and you can use more custom configurations in the AWS SDK client, like roles.

Before

const athenaClient = new AthenaClient({
    awsConfig: {
        accessKeyId: 'DASCDAS82941',
        apiVersion: '2017-05-18',
        region: 'eu-west-1',
        secretAccessKey: 'CJDADDHDASIUOHADS/3123DASE12',
    },
    bucketUri: 's3://athena-query-results-eu-west-1/',
    database: 'default',
    waitTime: 0.5,
    workGroup: 'my-work-group',
});

After

import {AthenaClient} from '@aws-sdk/client-athena';

const athena = new AthenaClient({});

const athenaNodeClient = new AthenaNodeClient(athena, {
    bucketUri: 's3://athena-query-results-eu-west-1/',
    database: 'default',
    waitTime: 0.5,
    workGroup: 'my-work-group',
});
  • If you use methods executeQueryAndGetS3Key executeQueryAndGetDownloadSignedUrl now you must create your S3 client
    before. The reason is the same with the Athena client.

Before

const athenaClient = new AthenaClient({
    awsConfig: {
        accessKeyId: 'DASCDAS82941',
        apiVersion: '2017-05-18',
        region: 'eu-west-1',
        secretAccessKey: 'CJDADDHDASIUOHADS/3123DASE12',
    },
    bucketUri: 's3://athena-query-results-eu-west-1/',
    database: 'default',
    waitTime: 0.5,
    workGroup: 'my-work-group',
});

After

import {AthenaClient} from '@aws-sdk/client-athena';
import {S3} from '@aws-sdk/client-s3';

const athena = new AthenaClient({});
const s3 = new S3({
    useDualstackEndpoint: true, // recommended to support IPv6
});

const athenaNodeClient = new AthenaNodeClient(athena, {
    bucketUri: 's3://athena-query-results-eu-west-1/',
    database: 'default',
    waitTime: 0.5,
    workGroup: 'my-work-group',
    s3Client: s3,
});
  • Method executeQueryAndGetS3Url is renamed to executeQueryAndGetS3Key and now returns and object with the S3 bucket
    and key of the object generated by Athena instead of returns an S3 schema url. If you want a direct URL to download the
    results, you must use executeQueryAndGetDownloadSignedUrl method.

  • All query related method, now have 2 parameters, sql and query config. The query parameters and query id, must be
    inside this second parameter:

Before

const results = await athenaClient.executeQuery<T>(query, parameters, queryId);

After

const results = await athenaNodeClient.executeQuery<T>(query, {
    parameters: {
        name: 'John',
        surname: 'Doe',
    },
    id: 'abcd',
    cacheInMinutes: 60,
});

Full Changelog: v1.4.3...v2.0.0

v1.4.3

Choose a tag to compare

@avegao avegao released this 10 Mar 17:38
v1.4.3
231a7de
  • fix: now AWS credentials must been environment variables o you need to pass your custom config

v1.4.1

Choose a tag to compare

@avegao avegao released this 28 Oct 11:56

v1.4.1-beta0

v1.4.1-beta0 Pre-release
Pre-release

Choose a tag to compare

@avegao avegao released this 28 Oct 10:07

v1.4.0

Choose a tag to compare

@avegao avegao released this 16 Oct 13:16
  • New method executeQueryAndGetDownloadSignedUrl() that returns a signed AWS S3 URL to download raw results from Athena.

v1.3.3

Choose a tag to compare

@avegao avegao released this 14 Oct 15:22
v1.3.3

v1.3.3-beta1

v1.3.3-beta1 Pre-release
Pre-release

Choose a tag to compare

@avegao avegao released this 14 Oct 08:19
  • Fixed a OOM exception when a query take a long time to finish.