pyhive, sqlalchemy can not connect to hadoop sandbox

后端 未结 2 1430
既然无缘
既然无缘 2021-01-27 15:28

I have installed,

pip install thrift
pip install PyHive
pip install thrift-sasl

and since pip install sasl failed I downloaded sa

2条回答
  •  执念已碎
    2021-01-27 15:46

    While using pyhive no authentication can be passed as auth="NOSASL", instead of "None", so your code should look like this:

    from pyhive import hive
    cursor = hive.connect('192.168.1.232', port=10000, auth='NOSASL')
    cursor.execute('SELECT * from sample_07 LIMIT 5',async=True)
    print cursor.fetchall()
    

提交回复
热议问题