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如何强制用户在允许访问活动之前处理对话框?我的许可证代码怎么了?   java ArraysList作为JSON   mysql如何在java中创建包含多个可选where子句的搜索语句?   java如何让Apache Camel在“直接”路径的末尾删除文件?   使用socket在两个Androids之间进行java实时数据传输。IO(websocket)和4G   如何在java中实现两个CORBA服务器之间的通信   会话树xml表示为java对象   java Skype4Java编号swtwin323325   java RecyclerView getAdapterPosition()不工作:第一次单击返回正确位置,第二次单击返回1   java在$TOMCAT/conf/context上为JNDI设置资源。xml   java为什么第二个矩形冲突在第一个矩形冲突时不起作用?   JScrollPane上的java JTextArea未出现在JPanel上   java如何将实现的PriorityQueue打印为字符串?   jpa使用Jersey更新用户角色RESTJava(JAXRS)