Presto学习笔记——Python客户端连接Presto 2016-03-15 tonglin0325 参考:三种客户端连接Presto 1.使用 presto-client 12pip install presto-client==0.302.0 查询 12345678910111213141516import presto# demo about the usage of presto-python-clientconn = presto.dbapi.connect( host='localhost', port=8889, user='hadoop', catalog='xx_catalog', schema='default' )cur = conn.cursor()sql = "select * from xxx.xxx limit 10"cur.execute(sql)rows = cur.fetchall() print(rows) Prometheus使用教程 字符编码