Member since
03-30-2020
3
Posts
0
Kudos Received
0
Solutions
03-30-2020
01:39 PM
Same requirement. Was anyone able to connect?
... View more
03-30-2020
11:45 AM
Can I use pyhive to connect to Hive using Hive JDBC string instead of a single hostname? The following doesn't work for me. from pyhive import hive hive_conn = hive . Connection ( host =<JDBC STRING> , configuration { 'serviceDiscoveryMode' : 'zooKeeper' , 'zooKeeperNamespace' : 'hiveserver2' })
... View more
03-30-2020
11:35 AM
I am currently using PyHive python package to connect to Hive. When using this package I am not able to provide HiveServer2 JDBC string as the host. I can only provide one host name.
jdbc:hive2://server1:2181,server2:2181,server3:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
Is there a way to connect to Hive from Python using the JDBC string? Does any other Python package allow that? Please provide samples.
Current code:
from pyhive import hive
hive_conn = hive.Connection(host=hive_host, configuration {'serviceDiscoveryMode':'zooKeeper','zooKeeperNamespace':'hiveserver2'})
Also tried using pyodbc but could not figure out the correct driver for Hortonworks Hadoop distribution. Need a working code for Linux distribution
... View more
Labels: