node-hive-jdbc

1.0.1 • Public • Published

nodejs jdbc for hive

install

npm i sugo-hive-jdbc

example

const HiveJdbc = require('sugo-hive-jdbc')
 
const conf = {
  url: 'jdbc:hive2://192.168.0.223:10000/default',
  drivername: 'org.apache.hive.jdbc.HiveDriver',
  minpoolsize: 10,
  maxpoolsize: 100,
  properties: {
    user: 'hive',
    password: ''
  }
}
 
const main = async () => {
  const hive = new HiveJdbc(conf)
  // const conn = await hive.getConnection()
  // query with params
  // const res = await hiveKit.runQuery('select * from users where userid=? limit 10', ['c81e728d9d4c2f636f067f89cc14862c'])
  // query without params
  const res = await hive.runQuery('select count(*) from users')
  console.log(res)
}
 
main()

Readme

Keywords

Package Sidebar

Install

npm i node-hive-jdbc

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

45.3 MB

Total Files

8

Last publish

Collaborators

  • vanceeasleaf