0

I try to connect to a JDBC:hive client via knox and if I run the following code:

import jaydebeapi;
import jpype;

conn = jaydebeapi.connect("org.apache.hive.jdbc.HiveDriver","<hive_jdbc_url>",["<username>", "<password>"],"/path/to/hive-jdbc-uber-<version>.jar")
curs = conn.cursor();
curs.execute("SELECT * FROM  Database WHERE day = 20181114 Limit 10");
curs.fetchall();
curs.close();

Python.exe stops working, and if I run the code in pycharm, I get the following error:

Process finished with exit code -1073741819 (0xC0000005)

I think it could be a problem with the environment variable, but I don't know what to chance to fix this issue.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Michi
  • 1
  • 2
  • Error 0xC0000005 is an access violation, which would suggest a bug somewhere in Python, Java or a native component somewhere in the mix. I'm not sure if based on the information provided, people will be able to help you. You may want to explicitly specify the versions used of Python, Java, Jaydebeapi, etc. – Mark Rotteveel Nov 20 '18 at 15:17
  • I am not sure about `jaydebeapi`. However `pyhive` is a better API to use connect to hive using JDBC – Gaurang Shah Nov 20 '18 at 15:50

0 Answers0