- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to connect to Hive through Knox using JDBC in python ?
- Labels:
-
Apache Hive
-
Apache Knox
Created ‎11-15-2017 12:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I would like to connect to Hive via Knox using JDBC connection in python. Please note that my cluster is secured and SSL is enabled and we use LDAP to Login to Hive via Knox.I am able to establish the connection to Hive using DbViz and JDBC driver of Hive. I had gone through a lot of links and haven't found any good examples as well as recommendations to connect hive using python.
Thank you in Advance,
Subash
Created ‎08-13-2018 02:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@subash sharma How did you solve this?
Created ‎08-14-2018 11:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @J Koppole,
I connected to hive using JayDeBeApi python package. To establish JDBC Connection, Download Hive Uber JDBC Jar created by @Tim Veil.
Steps to connect has been mentioned on JayDeBeApi link:
I am pasting sample code snippet below
import jaydebeapi; 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 some_table"); curs.close()
