安装包
pip install presto-python-client
python测试文件
import prestodb
conn=prestodb.dbapi.connect(
host='localhost',
port=8443,
user='username',
catalog='hive',
schema='default',
http_scheme='https',
auth=prestodb.auth.BasicAuthentication("username", "password"),
)
conn._http_session.verify = './presto.pem' --身份认证
cur = conn.cursor()
cur.execute('SELECT * FROM system.runtime.nodes')
rows = cur.fetchall()
print rows