Class org.apache.hive.jdbc.HiveDriver not found

Viewed 3320

I am trying to access hive from my local machine using hivejdbc driver. but i am facing issues. i am using below code.

not sure how to add jar to python.

import jaydebeapi

url = ("jdbc:hive2://" + "<hostname>" + ":" + str(10000)
+ "/"+ "db" +";principal=" + "hive/example.domain.com@DOMAIN.COM." + ";")
conn=jaydebeapi.connect("org.apache.hive.jdbc.HiveDriver", url,<path of jar file>)
curs = conn.cursor()
curs.execute("select * from table limit 10")
curs.fetchall() 
1 Answers

I think you need to include a library in your project (JAR file) which includes that missing class org.apache.hive.jdbc.HiveDriver.

Related