https://github.com/eventbrite/python_hive_utils
Utilities for accessing hive with Python.
https://github.com/eventbrite/python_hive_utils
Last synced: 9 months ago
JSON representation
Utilities for accessing hive with Python.
- Host: GitHub
- URL: https://github.com/eventbrite/python_hive_utils
- Owner: eventbrite
- License: bsd-3-clause
- Created: 2013-07-16T22:42:43.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-09-05T20:11:23.000Z (over 12 years ago)
- Last Synced: 2024-08-09T02:54:31.313Z (over 1 year ago)
- Language: Python
- Size: 160 KB
- Stars: 8
- Watchers: 222
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
==========
hive_utils
==========
Utilities for accessing and using hive with python.
Installing
==========
You can install **hive_utils** through ``pip`` or ``easy-install``::
pip install hive_utils
Or you can download the `latest development version`_, which may
contain new features.
Using hive_utils
================
**hive_utils** allows you to access hive with an API that is similar to
MySQL-python::
query = """
SELECT country, count(1) AS cnt
FROM User
GROUP BY country
"""
hive_client = hive_utils.HiveClient(
server=config['HOST'],
port=config['PORT'],
db=config['NAME'],
)
for row in hive_client.execute(query):
print '%s: %s' % (row['country'], row['cnt'])
License
========
**hive_utils** is copyright 2013 Eventbrite and Contributors, and is made
available under BSD-style license; see LICENSE for details.
.. _`latest development version`: https://github.com/eventbrite/python_hive_utils/tarball/master#egg=hive_utils