Home > Backend Development > Python Tutorial > Detailed explanation of examples of python connecting to impala

Detailed explanation of examples of python connecting to impala

PHP中文网
Release: 2017-06-20 15:14:46
Original
7009 people have browsed it

The relevant environment is as follows:

Python3.4

Win7 64-bit

Refer to the installation steps on the official website:

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 and 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

Instructions: .whl file to http://www.lfd.uci.edu/~gohlke/pythonlibs/ to download the corresponding python and windows versions

After installation, an error will be reported, as shown below:

Find the corresponding parser.py file according to the prompts and modify it as follows:

You’re done!

Try to connect to your hadoop.

from impala.dbapi import connect
conn = connect(host='192.168.1.3', port=21050,timeout=3600)
Copy after login

The above is the detailed content of Detailed explanation of examples of python connecting to impala. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template