long2ice/synch

你好,问一下通过synch可以做到不同数据库之间表的同步吗?

Closed this issue · 1 comments

source database: hexin
source database: hexin_storage

target database:hexin_count

说明:
hexin,hexin_storage这两个源数据库中的表需要时时同步到clickhouse的hexin_count数据库

我在操作过程中报以下错误:
cat /etc/synch.ini
[mysql]
server_id = 33

optional, read from show master status result if empty

init_binlog_file =mysql-bin.001000

optional, read from show master status result if empty

init_binlog_pos =2930840
host = 192.168.66.33
port = 3306
user = root
password = 123456

sync schema, format with mysql.schema, each schema for one section.

[mysql.hexin]

multiple separated with comma

tables = hexin_erp_storage_out_detail,hexin_erp_storage_out_main,hexin_erp_order,hexin_erp_order_goods

kafka partition, need when broker_type=kafka

kafka_partition = 0

[root@k8smaster ~]# synch --config /etc/synch.ini etl --schema hexin_count --renew
Traceback (most recent call last):
File "/usr/local/bin/synch", line 11, in
sys.exit(cli())
File "/usr/local/lib/python3.6/site-packages/synch/cli.py", line 66, in cli
parse_args.run(parse_args)
File "/usr/local/lib/python3.6/site-packages/synch/cli.py", line 19, in run
args.func(args)
File "/usr/local/lib/python3.6/site-packages/synch/replication/etl.py", line 12, in make_etl
Global.reader.etl_full(Global.writer, schema, tables, renew)
File "/usr/local/lib/python3.6/site-packages/synch/reader/init.py", line 32, in etl_full
for table in tables:
TypeError: 'NoneType' object is not iterable

可以实现不同库中的表同步到同一个clickhouse的同一个数据库中吗?

不能