Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connecting to HiveServ from Python 3.6.1 #70

Open
michela23 opened this issue Jun 21, 2017 · 3 comments
Open

connecting to HiveServ from Python 3.6.1 #70

michela23 opened this issue Jun 21, 2017 · 3 comments

Comments

@michela23
Copy link

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'

@muxuezi
Copy link

muxuezi commented Jun 24, 2017

So do I

@michela23
Copy link
Author

did u solve the issue?

@muxuezi
Copy link

muxuezi commented Jul 25, 2017

@michela23 never

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants