需求:通过Anaconda3.6.7连接hive查询

步鄹:

下载pyhive

conda install pyhive

通过python连接hive

查询脚本

from pyhive import hive
conn = hive.Connection(host="IP", port=10000, username="hive")
cursor= conn.cursor()
cursor.execute('select * from db.table limit 10')
for result in cursor.fetchall():
    print(result)

通过python连接hive

相关文章:

  • 2022-12-23
  • 2021-04-04
  • 2022-12-23
  • 2021-08-12
  • 2021-07-13
  • 2021-06-30
猜你喜欢
  • 2022-03-08
  • 2022-12-23
  • 2021-04-17
  • 2021-10-26
  • 2021-09-29
相关资源
相似解决方案