connecting to HiveServ from Python 3.6.1
Opened this issue · 3 comments
Hello
I am trying to connect to Hive using python 3.6.1
import pyhs2
with pyhs2.connect(host='xx.xxx.xxx.xxx',
port=xxxx,
authMechanism="PLAIN",
user='group',
password='xxxx',
database='hadoop_introduction') as conn:
with conn.cursor() as curr:
#Show databases
#print curr.getDatabases()
#Execute query
curr.execute("select * from slocations")
#Return column info from query
#print curr.getSchema()
#Fetch table results
for i in curr.fetch():
print (i)
However when I connect I get the below error
Traceback (most recent call last):
File "connect_hadoop.py", line 14, in
database='hadoop_introduction') as conn:
File "\AppData\Roaming\Python\Python36\site-packages\pyhs2-0.6.0-py3.6.egg\pyhs2_init_.py", line 6, in connect
File \AppData\Roaming\Python\Python36\site-packages\pyhs2-0.6.0-py3.6.egg\pyhs2\connections.py", line 7, in
ModuleNotFoundError: No module named 'cloudera'
So do I
did u solve the issue?
@michela23 never