JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2053
  • Score
    100M100P100Q126709F
  • License MIT

Athena-Query makes it easier to execute SQL queries on Amazon Athena by consolidating & abstracting several methods in the AWS SDK

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@classmethod/athena-query) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Athena-Query

    Release CI npm version GitHub license

    Athena-Query provide simple interface to get athena query results.

    Athena-Query wad inspired and forked from athena-express.

    Warning Athena-Query support aws-sdk v3 only. So if you use aws-sdk v2, we recommend to use athena-express.

    Installation

    npm install athena-query @aws-sdk/client-athena
    yarn add athena-query @aws-sdk/client-athena

    Usage

    Athena-Query provide async generator function. So we can use it with for await () {},

    import { Athena } from "@aws-sdk/client-athena";
    import AthenaQuery from "athena-query";
    
    const athena = new Athena({});
    const athenaQuery = new AthenaQuery(athena);
    
    for await (const items of athenaQuery.query("SELECT * FROM waf_logs;")) {
      console.log(items); // You can get all items with pagination by query.
    }