Giter Club home page Giter Club logo

drillnode's Introduction

Node.js client for Apache Drill

Drillnode is a client to connect and execute queries on Apache Drill from Node.js using the REST APIs.

Installation

To install drillnone with npm package manager

npm install drillnode

Getting Started

// Requirements
const Drill = require('drillnode');

// Init Drill client
const drill = new Drill({
  url: 'http://localhost:8047'
});

// Make a query
drill.query("SELECT * FROM dfs.`home/<USERNAME>/apache-drill-<VERSION>/sample-data/region.parquet` WHERE R_NAME = 'AFRICA'")
.then(function(resdata) {
  console.log(resdata);
})
.catch(function(err) {
  console.log(err);
});

drillnode's People

Contributors

davidemiceli avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

drillnode's Issues

Socket Hangup

{ RequestError: Error: socket hang up
at new RequestError (\request-promise-core\lib\errors.js:14:15)
at Request.plumbing.callback (
\request-promise-core\lib\plumbing.js:87:29)
at Request.RP$callback [as _callback] (\request-promise-core\lib\plumbing.js:46:31)
at self.callback (
\request\request.js:186:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Request.onRequestError (****\request\request.js:878:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at Socket.socketOnEnd (_http_client.js:346:9)
name: 'RequestError',
message: 'Error: socket hang up',
cause:
{ Error: socket hang up
at createHangUpError (_http_client.js:254:15)
at Socket.socketOnEnd (_http_client.js:346:23)
at emitNone (events.js:91:20)
at Socket.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9) code: 'ECONNRESET' },
error:
{ Error: socket hang up
at createHangUpError (_http_client.js:254:15)
at Socket.socketOnEnd (_http_client.js:346:23)
at emitNone (events.js:91:20)
at Socket.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9) code: 'ECONNRESET' },
options:
{ method: 'POST',
uri: 'http://localhost:77/query.json',
body:
{ queryType: 'SQL',
query: 'SELECT * FROM **** LIMIT 1' },
json: true,
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false },
response: undefined }

I am getting the above error when I try to access the drill

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.