Support Questions
Find answers, ask questions, and share your expertise

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

New Contributor


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