Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Connect to Hive 3 via Python 3 using hiveserver2 jdbc url on HA HDP cluster

Connect to Hive 3 via Python 3 using hiveserver2 jdbc url on HA HDP cluster

New Contributor

Hi,

I'm using HDP 3.1.4 stack with Hive 3.1.0 version.

I would like to connect to Hive in Python script (Python 3.6 or 3.7) using JDBC url (jdbc:hive2://...).

I don't find any tutorial about this way to connect via JDBC.

Nota: HA is configured so we use multiple nodes:

- hive.metastore.uris = thrift://xxxx1:9083,thrift://xxxx2:9083

- hiveserver2 jdbc url = jdbc:hive2://xxxx1:2181,xxxx2:2181,xxxx3:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2

Could you help me to achieve it ?

Thank you for your help

Don't have an account?
Coming from Hortonworks? Activate your account here