Socket
Socket
Sign inDemoInstall

promoted-athena-query

Package Overview
Dependencies
140
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    promoted-athena-query

Library to simplify calling AWS Athena


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

promoted-athena-query

This library is used to simplify calling AWS Athena.

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

const athenaClient = new AthenaClient({
    region: 'YOUR_AWS_REGION',
    credentials: {
        accessKeyId: 'YOUR_AWS_ACCESS_KEY_ID',
        secretAccessKey: 'YOUR_AWS_SECRET_ACCESS_KEY'
    },
});

export const index = async (): Promise<void> =>
    new AthenaQuery({
        athenaClient,
        query: 'SELECT * FROM my_db.my_table',
        batchProcessor: async (rows) => {
            // Process rows in batches for large queries.
            console.log(rows);
        },
    }).processQuery();

Features

Uses

  • TypeScript support
  • React support
  • ESLint (with React and Prettier)
  • Unit tests (Jest and Testing Library)
  • Minified output with Terser
  • Bundle size validation with size-limit
  • Flexible builds with Rollup
  • CHANGELOG.md template

Scripts

  • Run most commands: npm run finish
  • Build the project: npm run build
    • Validate output bundle size with npm run size
  • Lint the project: npm run lint
  • Run unit tests: npm test or npm test

When developing locally

If you want to test local changes in an actual deployment, use npm link.

  1. Run npm run updateLink.
  2. Go to client directory and run npm link promoted-athena-query.

When you update promoted-athena-query, run npm run updateLink.

When you want to undo, use npm unlink in promoted-athena-query/dist and npm unlink promoted-athena-query in the client directory.

Deploy

We use a GitHub action that runs semantic-release to determine how to update versions. Just do a normal code review and this should work. Depending on the message prefixes (e.g. feat: , fix: , clean: , docs: ), it'll update the version appropriately.

Resources

The base of this repository is a combination of the following repos:

Keywords

FAQs

Last updated on 02 Feb 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc