In: Computer Science
"How can I connect to Hadoop Hive using Python? I've tried using PyHive but always get the error:
...could not start SASL... no mechanism available: unable to find a callback: 2"
pip install sasl pip install thrift pip install thrift-sasl pip install PyHive
from pyhive import hive conn = hive.Connection(host="YOUR_HIVE_HOST", port=PORT, username="TIGER")
cursor = conn.cursor() cursor.execute("SELECT cool_stuff FROM hive_table") for result in cursor.fetchall(): use_result(result)