Reputation: 87
Is there a module or a connector that allows Python directly access Hive tables? Any help would be greatly appreciated.
Upvotes: 0
Views: 5268
Reputation: 12930
Python has a Pyhive
library that you can use to connect to hive database and run query against them.
it allows you to connect through JDBC and Kerberos Authentication. However, it's bit buggy and JDBC over SSL seems not supported.
This is how you connect
connection = hive.connect(host='HIVE_HOST',
port=10000,
database='temp',
username='HIVE_USERNAME',
password='HIVE_PASSWORD',
auth='CUSTOM')
You can find more details here.
http://allabouthadoop.net/how-to-access-hive-with-python-script/
And these are the two issues I am talking about
Upvotes: 1