0.0.12 • Published 10 months ago

knex-dialect-athena v0.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
10 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

10 months ago

0.0.11

10 months ago

0.0.12

10 months ago

0.0.9

10 months ago

0.0.8

10 months ago

0.0.5

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago

0.0.0

10 months ago