Skip to content

Trino requester for Plywood (within node) based on Postgres Requester

License

Notifications You must be signed in to change notification settings

nakulgan/plywood-trino-requester

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

plywood-trino-requester

This is the Trino requester making abstraction layer for plywood.

Given a Trino query and an optional context it return a Q promise that resolves to the data table.

Installation

To install run:

npm install plywood-trino-requester

Usage

In the raw you could use this library like so:

trinoRequesterGenerator = require('plywood-trino-requester').trinoRequester

trinoRequester = trinoRequesterGenerator({
  host: 'my.trino.host',
  database: 'all_my_data',
  user: 'HeMan',
  password: 'By_the_Power_of_Greyskull'
})

trinoRequester({
  query: 'SELECT "cut" AS "Cut", sum("price") AS "TotalPrice" FROM "diamonds" GROUP BY "cut";'
})
  .then(function(res) {
    console.log("The first row is:", res[0])
  })
  .done()

Although usually you would just pass trinoRequester into the Trino driver that is part of Plywood.

Tests

ToDo:

  • Trino Dockerfile with test DB
  • [ ]

About

Trino requester for Plywood (within node) based on Postgres Requester

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 67.3%
  • TypeScript 28.0%
  • Shell 4.7%