Presto学习笔记——Python客户端连接Presto
1.使用 presto-client
pip install presto-client==0.302.0
查询
import presto # demo about the usage of presto-python-client conn = 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)
本文只发表于博客园和tonglin0325的博客,作者:tonglin0325,转载请注明原文链接:https://www.cnblogs.com/tonglin0325/p/5279379.html