Socket
Book a DemoInstallSign in
Socket

@padho/gimlet

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@padho/gimlet

A JavaScript client for Apache Drill

0.2.1
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Gimlet - JavaScript Client for Apache Drill

Gimlet is an open source Node.js module for Apache Drill - and the first that supports authentication. It's build using modern JavaScript and supports promises and async/await.

Installation

You can either use npm...

$ npm i @padho/gimlet

... or yarn

$ yarn add @padho/gimlet

Usage

Using Gimlet is simple. Let's take a look at the following basic example:

// Import Gimlet
const {Gimlet} = require('@padho/gimlet');
let data;

// Create a new Gimlet instance
let options = {
    host: '127.0.0.1', // Host
    port: 8047, // Port
    user: null, // Drill user
    password: null, // Drill user password
    ssl: false, // Use SSL
    restTimeout: 15000 // Timeout for running queries
};

let gimlet = new Gimlet(options);

try {
    data = await gimlet.query(
        'select * from dfs.`/Users/Patrick/Data/myCoolDataSet.csv` limit 3'
    );
} catch(e) {
    // Some error occured!
}

API

Gimlet currently provides support for following REST APIs of Apache Drill:

// ...
// Sends a query to Drill (default queryType is SQL)
gimlet.query(query, queryType);

// Lists all installed storage plugins
gimlet.getStorageList();

// Gets the config of a specific storage plugin by name
gimlet.getStoragePluginByName(name);

// Enables a specific storage plugin by name
gimlet.enableStoragePluginByName(name);

// Disables a specific storage plugin by name
gimlet.disableStoragePluginByName(name);

//Creates a new storage plugin by name and definition
gimlet.createStoragePluginByName(definition);

// Deletes a specific storage plugin by name
gimlet.deleteStoragePluginByName(name);

// Deletes a specific storage plugin by name
gimlet.deleteStoragePluginByName(name);

 // Checks if a specific storage plugin exists
gimlet.storagePluginExists(name);

License

Apache-2.0 © Patrick Holl

Keywords

apache

FAQs

Package last updated on 05 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.