0.0.12 • Published 8 months ago

knex-dialect-athena v0.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

knex-dialect-athena

A Knex dialect for AWS Athena.

Installation

Using your favorite package manager, install knex-dialect-athena, along with its peer dependencies (if you don't already have them installed):

npm install knex-dialect-athena knex @aws-sdk/client-athena

Usage

This package exports the createAthenaDialect function, the result of which can be passed to knex's client option:

import Knex from "knex";
import { createAthenaDialect } from "knex-dialect-athena";

const knex = Knex({
  client: createAthenaDialect({
    database: "my-database-name",
    outputLocation: "s3://my/output/location",
    // Additional `AthenaClient` options can go here:
    // region: "..."
  }),
});

interface User {
  id: number;
  name: string;
  age: number;
}

// Retrieves the data from the provided Athena database
const user = await knex<User>("users").where("id", 1).first();
0.0.10

8 months ago

0.0.11

8 months ago

0.0.12

8 months ago

0.0.9

8 months ago

0.0.8

8 months ago

0.0.5

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago

0.0.0

9 months ago