Skip to main content

A package interact with the Hive metastore via the Thrift protocol

Project description

This project aims to be an up to date Python client to interact with the Hive metastore using the Thrift protocol.


Install it with pip install hmsclient or directly from source

python install


Using it from Python is simple:

from hmsclient import hmsclient
client = hmsclient.HMSClient(host='localhost', port=9083)
with client as c:
    c.check_for_named_partition('db', 'table', 'date=20180101')

Regenerate the Python thrift library

The is just a thin wrapper around the generated Python code to interact with the metastore through the Thrift protocol.

To regenerate the code using a newer version of the .thrift files, you can use (note: you need to have thrift installed, see here)

python --help

Usage: [OPTIONS]

  --fb303_url TEXT      The URL where the fb303.thrift file can be downloaded
  --metastore_url TEXT  The URL where the hive_metastore.thrift file can be
  --package TEXT        The package where the client should be placed
  --subpackage TEXT     The subpackage where the client should be placed
  --help                Show this message and exit.

Otherwise the defaults will be used.

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

hmsclient-0.1.1.tar.gz (84.4 kB view hashes)

Uploaded source

Built Distribution

hmsclient-0.1.1-py3-none-any.whl (90.4 kB view hashes)

Uploaded py3

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