Using a Hive Database


#1

I’m not being able to use a hive as a Database.
I have the same error reported in https://github.com/getredash/redash/issues/1076 (hive is not defined) and I’ve tried the same steps (pip install, etc.) but each step I try leads to another problem (now, missing sasl.h). The website has no information of how to setup redash to use a hive database and I’m totally stuck now.

Any help ?


#2

Try doing what Nabil did for the Docker image (see #1077):

  1. Install libsasl2-dev (system package).
  2. Install with pip: pyhive==0.1.6, sasl>=0.1.3, thrift>=0.8.0, thrift_sasl>=0.1.0.

#3

I might be missing something, but it’s not working yet. See exactly what I did:

sudo apt-get update
sudo apt-get install libsasl2-dev
pip install pyhive
pip install sasl
pip install thrift
pip install thrift-sasl
pip install pyhive[hive]

on python:
from pyhive import hive
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/pyhive/hive.py”, line 10, in
from TCLIService import TCLIService
ImportError: No module named TCLIService

Am I missing something ? :frowning:


#4

Notice the pip package versions and make sure you have the correct ones.


#5

I worked after I updated pyhive

pip install pyhive --upgrade

it’s not using the same version, but it seems to work file since them…

The final question is: couldn’t the docker image be fully configured/updated avoiding all this procedure, or there’s any good reason to that ?


#6

The Docker image was updated in the pull request I linked to above (#1077). Do note that latest tag in the registry still points to 0.10.1 until I mark 0.11 as latest.