-
安装需要的模块(有的可以忽略)
# pip install sasl(wheel:https://www.lfd.uci.edu/~gohlke/pythonlibs) # pip install thrift # pip install thrift-sasl # pip install PyHive
-
执行代码
from pyhive import hive conn = hive.Connection(host='192.168.124.136', port=10000,username='', database='dbtaobao') cursor = conn.cursor() cursor.execute('show tables') for result in cursor.fetchall(): print(result)
python连接hive
最新推荐文章于 2023-09-16 20:32:36 发布