Hello, fishman

Posts

python mysql 2 clickhouse

admin
from clickhouse_driver import Client

client = Client(host='39.99.190.103',database='default',user='default',password='Jin121520')
sql = """
insert into phone SELECT id, good_id, title, province, city, brandName, shopName, platFormName, sellCount, priceText, salesAmount, model, rom, color, ram, name, timeStamp FROM mysql('rm-8vb716gfz7wm7w21wao.mysql.zhangbei.rds.aliyuncs.com:3306', 'phone', 'phone', 'root', 'Beijing@2019')
"""
try:     
    client.execute(sql, types_check=True)
except Exception as e:
    print(e)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top