3

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() 
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
LUZO
  • 1,019
  • 4
  • 19
  • 42

1 Answers1

0

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

Mayank Porwal
  • 33,470
  • 8
  • 37
  • 58