Skip to main content

Python Driver for Apache Drill.

Project description

pydrill

https://img.shields.io/travis/PythonicNinja/pydrill.svg https://img.shields.io/pypi/v/pydrill.svg Documentation Status https://coveralls.io/repos/PythonicNinja/pydrill/badge.svg?branch=master&service=github

Python Driver for Apache Drill.

Schema-free SQL Query Engine for Hadoop, NoSQL and Cloud Storage

Features

  • Python 2/3 compatibility,

  • Support for all rest API calls inluding profiles/options/metrics docs with full list.

  • Mapping Results to internal python types,

  • Compatibility with Pandas data frame,

  • Drill Authentication using PAM,

Installation

Version from https://pypi.python.org/pypi/pydrill:

$ pip install pydrill

Latest version from git:

$ pip install git+git://github.com/PythonicNinja/pydrill.git

Sample usage

from pydrill.client import PyDrill

drill = PyDrill(host='localhost', port=8047)

if not drill.is_active():
    raise ImproperlyConfigured('Please run Drill first')

yelp_reviews = drill.query('''
  SELECT * FROM
  `dfs.root`.`./Users/macbookair/Downloads/yelp_dataset_challenge_academic_dataset/yelp_academic_dataset_review.json`
  LIMIT 5
''')

for result in yelp_reviews:
    print("%s: %s" %(result['type'], result['date']))


# pandas dataframe

df = yelp_reviews.to_dataframe()
print(df[df['stars'] > 3])

History

0.3.4 (2017-04-24)

  • Updated pypi listing long_description

0.3.3 (2017-04-24)

  • Fix pypi installation

0.3.2 (2017-04-18)

  • Support for dtype on to_dataframe

0.3.1 (2017-03-06)

  • Support for Drill Authentication using PAM

0.3 (2017-02-15)

  • requests response encoding (utf-8)

  • support Python 3.6 support

0.1.1 (2016-05-21)

  • Anaconda requirements fixed

0.1.0 (2016-05-19)

  • First minor release

  • Updated docs

0.0.2 (2016-04-24)

  • First release on PyPI.

  • Implementation of metrics/storage/options/stats

  • Builds are tested by docker container with Apache Drill running

  • support for pandas with ResultQuery.to_dataframe

0.0.1 (2015-12-28)

  • Project start

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydrill-0.3.4.tar.gz (23.1 kB view details)

Uploaded Source

File details

Details for the file pydrill-0.3.4.tar.gz.

File metadata

  • Download URL: pydrill-0.3.4.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pydrill-0.3.4.tar.gz
Algorithm Hash digest
SHA256 d6f410ae9ca921f284dd520751f38e4d36f5c74da7e483ce54962439bd6544a9
MD5 62a045f7a8bb57b9551bb3d8cde6d424
BLAKE2b-256 238eb8f3998547e008dc8dbdc6764235f1f6e60d2813a3a1c426b3af447d2e81

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page