Hive client for Python 3.x

2019-06-23 17:22发布

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'.

1条回答
我欲成王,谁敢阻挡
2楼-- · 2019-06-23 18:20

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;.

查看更多
登录 后发表回答