2021
02-26
02-26
python实现MySQL指定表增量同步数据到clickhouse的脚本
python实现MySQL指定表增量同步数据到clickhouse,脚本如下:#!/usr/bin/envpython3#_*_coding:utf8_*_frompymysqlreplicationimportBinLogStreamReaderfrompymysqlreplication.row_eventimport(DeleteRowsEvent,UpdateRowsEvent,WriteRowsEvent,)importclickhouse_driverimportconfigparserimportosconfigfile='repl.ini'##########配置文件repl.ini操作##################defcreate_configfile(configfile,log_...
继续阅读 >