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.
Installation
Install it with pip install hmsclient or directly from source
python setup.py install
Usage
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 hmsclient.py 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 generate.py (note: you need to have thrift installed, see here)
python generate.py --help
Usage: generate.py [OPTIONS]
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
downloaded
--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
Built Distribution
File details
Details for the file hmsclient-0.1.1.tar.gz
.
File metadata
- Download URL: hmsclient-0.1.1.tar.gz
- Upload date:
- Size: 84.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 908bdf1e082865d2b8a87a25290f8bd16b3bf4e71c028762231a9cfa49814286 |
|
MD5 | ca22cd9d7211adfaa9459d0bdd2c939f |
|
BLAKE2b-256 | a4b537ad13cc386f22ea68446aa636497082db38cff42801f9c3aefa02310eaa |
File details
Details for the file hmsclient-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: hmsclient-0.1.1-py3-none-any.whl
- Upload date:
- Size: 90.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6163c46ecbd7b97e10099039186155fe2712ade1630da7c90075e3ccac91d909 |
|
MD5 | 7853399c0556f56aa93c8f40bd159a23 |
|
BLAKE2b-256 | 35a9c8607f2e1e4f9312767723a3a938f09cb9bd98644359569af6eddce3e8ad |