Is there anyway to connect hive DB from python3.8? I tried in Jupyter using below steps
- from pyhive import hive
- pip install sasl
- conn = hive.Connection(host=host_name, port=8888, username=user,password=password,
database=database,auth=‘CUSTOM’)
SASL package I am not able to install getting error for newer version of Micrsofot VS 14.0 but as per error message it seems it can be bypassed.
Alternatively can we connect hive using available JDBC connection api.
Please suggest
But getting below error:-
conn = hive.Connection(host=host_name, port=8888, username=user,password=password,
database=database,auth=‘CUSTOM’)
ModuleNotFoundError Traceback (most recent call last)
in
----> 1 conn = hive.Connection(host=host_name, port=8888, username=user,password=password,
2 database=database,auth=‘CUSTOM’)
~\Anaconda3\lib\site-packages\pyhive\hive.py in init(self, host, port, scheme, username, database, auth, configuration, kerberos_service_name, password, check_hostname, ssl_cert, thrift_transport)
201 elif auth in (‘LDAP’, ‘KERBEROS’, ‘NONE’, ‘CUSTOM’):
202 # Defer import so package dependency is optional
→ 203 import sasl
204 import thrift_sasl
205
ModuleNotFoundError: No module named ‘sasl’