简体   繁体   中英

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

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() 

我认为您需要在项目(JAR文件)中包括一个缺少该类的库org.apache.hive.jdbc.HiveDriver

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM