trino-ts
TypeScript icon, indicating that this package has built-in type declarations

3.0.3 • Public • Published

Trino TS

trino-ts is a lib for JavaScript/TypeScript that allows the interaction and execution of queries in Trino (formerly known as Presto).

Installation

Add the dependency to your project using your favorite dependency manager.

npm install --save trino-ts

or

yarn add trino-ts

Example

import { Trino, TrinoQueryParams, TrinoResponse } from  'trino-ts';

const updatesNotification = (response: TrinoResponse) => {
  console.log(response)
}

const errorNotification = (error: Error) => {
  console.error(error)
}

const trinoInstance = new Trino({
  catalog: 'bigdata_catalog',
  schema: 'bigdata_schema',
  user: 'root',
  password: 'any_password',
  host: '127.0.0.1',
  port: '8080',
  source: 'NodeJS Trino Connector',
  checkStatusInterval: 1000, //1s
  isBasicAuth: true,
  isHttps: false,
  query: 'SELECT * FROM tbcliente',
  errorNotification,
  updatesNotification
})
trinoInstance.go()

Package Sidebar

Install

npm i trino-ts

Weekly Downloads

0

Version

3.0.3

License

ISC

Unpacked Size

49.9 kB

Total Files

31

Last publish

Collaborators

  • manerixx