Python Hivemetastore

tech2023-12-06  36

关于hive metastore的获取

辗转反侧啊,之前发现了 一个库是用py2写的。但是不大用了,所以就准备找一个py3的库

今天给找到了

github地址

安装地址直接 pip install hmsclient3 即可

from pprint import pprint from hmsclient import hmsclient client = hmsclient.HMSClient(host='xxx.xx.xx.xx', port=9083) print(client) with client as c: # print(c.get_fields('events', 'envent_new')) info = client.get_partition_by_name('xx','xx','xx=xx') pprint(info)

具体的用法可以自己研究研究。

最新回复(0)