clickhouse的python库:clickhouse-driver使用 发表于 2018-01-27 | 安装1pip install clickhouse-driver 导入1from clickhouse_driver import Client 连接123import clickhouse_driverclient = clickhouse_driver.Client(host='localhost', port='9000', database='xxx', user='default', password='xxx') 创建表1client.execute('create table aaa(id Int8,name Stinrg) ENGINE = Memory') 查询12for id in client.execute('SELECT id,name FROM aaa limit 20'): print(id) 添加插入1client.execute("""insert into aaa (id,name) VALUES""", [(1, 'lwg')]) github 禹都一只猫,热爱IT,支持原创 打赏 微信支付 支付宝 本文作者: olei.me 本文链接: http://blog.olei.me/2018/01/27/clickhouse的python库-clickhouse-driver使用/ 版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 许可协议。转载请注明出处!