impala分布式查询引擎的python客户端

ym-impyla的Python项目详细描述


#impyla

分布式查询引擎。


有关更高级别的impala功能,包括
分布式数据集上类似熊猫的接口,请参阅[ibis项目][ibis]。

包括嵌套数据

*完全[db api 2.0(pep 249)][pep249]-兼容的python客户端(类似于sqlite或mysql客户端),支持python 2.6+和python 3.3+。


*与kerberos、ldap、ssl

*[sqlalchemy][sqlalchemy]连接器

*转换为[panda][panda]`dataframe`,允许轻松集成到
python数据堆栈中(包括[scikit learn][sklearn]和
[matplotlib][matplotlib]);但请参见[ibis项目][ibis]以获得更丰富的



`位数组`

*`thrift`(在python 2.x上)或'thriftpy`(在python 3.x上)


对于配置单元和/或kerberos支持:

`````
pip install thrift嫒sasl
pip install sasl
```

*可选:

*`pandas`用于转换为“dataframe”对象;但是,请参见[ibis项目][ibis]而不是


*`sqlalchemy` sqlalchemy` sqlalchemy` sqlalchemy` sqlalchemy` sqlalchemy` sqlalchemy` sqlalchemy引擎









>安装impyla的最新版本(`0.13.1`)`0.13.1`)的pip `:





对于最新的(开发)版本,直接从回购站直接安装:


``bash
pip install git+https://github.com/cloudera/cloudera/impyla.git
`````


或者克隆回购站:

`` bash
git clone https://github.com/cloudera/impyla.git
cd impyla
python setup.pyinstall
``

<

<


环境变量:
“BASH < BR/>出口IMPYLALA TestOrthHOST=您的.IMPALAD.com。BR/>出口IMPYLALA TestOrthPoT=21050 Br/>出口IMPYLLA TestSuthAuthMeCH=NASASL
‘BR/>< BR/>运行最大测试集,运行

``bash
cd path/to/impyla
py.test——connect impyla
````


/>去掉`--connect`选项,跳过db-api符合性的测试。







impyla实现了[python db-api v2.0(pep 249)][pep249]数据库接口
(api详细信息请参阅其相关信息):





```python
来自impala.db apiimport connect
conn=connect(host='my.host.com',port=21050)
cursor=conn.cursor()
cursor.execute('select*from mytable limit 100')
print cursor.description打印结果集的架构
result s=cursor.fetchall()
```

cursor对象还公开迭代器接口,迭代器接口被缓冲
(受控通过“cursor.arraysize`):

``python
cursor.execute('select*from mytable limit 100')
对于cursor中的行:
process(row)
`````

比如,
`````



[pep249:http://legacy.python.org/dev/peps/pep-0249/
[pandas:http://pandas.pydata.org/
[sklearn:http://sckit-learn.org/
[matplotlib:http://matplotliblibliblib.org/
[madllib:http://madllib.net/
[madllib:http://madllib.net/
[madllib:http://www://github.com/bitbfort/madllibport/madllibport
/madllibport
[numba]>[a]br/>[llvm]:http://llvm.org/
[pytest]:http://pytest.org/latest/
[sqlalchemy]:http://www.sqlalchemy.org/
[ibis]:http://www.ibis-project.org/
[python sasl cython]:https://github.com/laserson/python sasl/tree/cython/sasl

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Selenium运行ChromeDriver而不修改路径   java软件包sun。网www.protocol。https不可见   java AEM中的哪个类实现了javax。servlet。请求调度器接口?   在java/scala中读取zip或7z文件时的性能问题   java将一个文件写入另一个二进制文件   java在类本身中创建实例   Java中C#Action()委托的等价物?   java如何在任何类中使用@Context或类似工具获取ServletRequest?   重构(java)应该/如何重构此代码?   hibernate中的java TransientObject异常   gwt使用Java在CouchDB 2.0 fauxton中创建文档   xml错误Java Jersey:NotAuthorizedException:HTTP 401未经授权   java heroku错误:无法找到或加载主类   java从CAS 5.0检索已发布的属性。Spring Security中的x 3.2.5