用于Python 3.x的Hive客户端 [英] Hive client for Python 3.x

查看:109
本文介绍了用于Python 3.x的Hive客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以连接到hadoop并使用Python 3.x运行配置单元查询?我使用的是Python 3.4.1。



我发现它可以这样写:

然而,我无法安装配置单元模块,因为它表示'找不到满足需求配置单元的版本'。

如果您安装了HiveServer2,则可以使用 pyhs2
或者如果您在本地执行脚本,则可以使用子进程并捕获 hive -e your_query;

的输出。

is it possible to connect to hadoop and run hive queries using Python 3.x? I am using Python 3.4.1.

I found out that it can be done as written here: https://cwiki.apache.org/confluence/display/Hive/HiveClient#HiveClient-Python

However, I cannot install hive module because it says that 'Could not find a version that satisfies the requirement hive'.

解决方案

If you have HiveServer2 installed you can use pyhs2. Or if you're execution your script locally, than you can use subprocess and catch the output of hive -e your_query;.

这篇关于用于Python 3.x的Hive客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆