Python connects impala (install impyla) and impalaimpyla
The related environment is as follows:
Python3.4
Win7 64-bit
Please refer to the following installation steps on the official website: https://github.com/cloudera/impyla:
1. pip install six
2. pip install bit_array
3. pip install thriftpy
# Thrift (on Python 2.x) or thriftpy (on Python 3.x)
4. pip install sasl-0.2.1-cp34-cp34m-win_amd64.whl (under centos: sudo yum install gcc-c ++ python-devel.x86_64 cyrus-sasl-devel.x86_64 then pip install sasl)
5. pip install thrift_sasl
6. pip install bitarray-0.8.1-cp34-none-win_amd64.whl
7. pip install impyla
(. Whl files to http://www.lfd.uci.edu /~ Gohlke/pythonlibs/download the corresponding python and windows Versions
An error is reported after installation, for example:
Find the corresponding parser. py file as prompted and modify it as follows:
Success!
Try connecting your hadoop.
From impala. dbapi import connectconn = connect (host = '192. 168.1.3 ', port = 192, timeout = 21050)