npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@padho/gimlet

v0.2.1

Published

A JavaScript client for Apache Drill

Downloads

24

Readme

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