Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多表复制,配置文件应该怎么配置 #54

Closed
guiqiang179 opened this issue Aug 17, 2021 · 3 comments
Closed

多表复制,配置文件应该怎么配置 #54

guiqiang179 opened this issue Aug 17, 2021 · 3 comments

Comments

@guiqiang179
Copy link

作者,你好,请问下 同步多张表的yaml或者 conf配置文件 应该怎么写 我用 逗号分隔,程序直接连两张表都取出来了。
2021-08-16 15:45:29 - synch.replication.etl:84 - WARNING - No pk found in clickhouse.order_goods,invoice_order, skip

@long2ice
Copy link
Owner

tables:
 - table1
 - table2

@guiqiang179
Copy link
Author

  • table: order_goods
  • table: invoice_order

[root@localhost ~]# synch --alias mysql_db etl --schema clickhouse --renew
2021-08-17 10:28:20 - synch.reader:29 - DEBUG - select COLUMN_NAME from information_schema.COLUMNS where TABLE_SCHEMA='clickhouse' and TABLE_NAME='order_goods' and COLUMN_KEY='PRI'
2021-08-17 10:28:20 - synch.reader:29 - DEBUG - select COLUMN_NAME from information_schema.COLUMNS where TABLE_SCHEMA='clickhouse' and TABLE_NAME='invoice_order' and COLUMN_KEY='PRI'
2021-08-17 10:28:20 - synch.replication.clickhouse:33 - DEBUG - drop table clickhouse.invoice_order
2021-08-17 10:28:20 - synch.replication.etl:92 - INFO - drop table success:clickhouse.invoice_order
2021-08-17 10:28:20 - synch.replication.clickhouse:33 - DEBUG - select count(*)from system.tables where database = 'clickhouse' and name = 'invoice_order'
2021-08-17 10:28:20 - synch.replication.clickhouse:33 - DEBUG - CREATE TABLE clickhouse.invoice_order ENGINE = MergeTree ORDER BY id AS SELECT * FROM mysql('172.16.0.40:3306', 'clickhouse', 'invoice_order', 'ch_repl', 'ch_repl') limit 0
2021-08-17 10:28:20 - synch.replication.clickhouse:44 - DEBUG - select COLUMN_NAME, COLUMN_TYPE,IS_NULLABLE from information_schema.COLUMNS where TABLE_NAME = 'invoice_order' and COLUMN_TYPE like '%decimal%'and TABLE_SCHEMA = 'clickhouse'
2021-08-17 10:28:20 - synch.replication.clickhouse:33 - DEBUG - alter table clickhouse.invoice_order modify column money_paid Nullable(Decimal(10,2))
2021-08-17 10:28:20 - synch.replication.clickhouse:33 - DEBUG - alter table clickhouse.invoice_order modify column refund_money Nullable(Decimal(10,2))
2021-08-17 10:28:20 - synch.replication.clickhouse:33 - DEBUG - insert into clickhouse.invoice_order SELECT * FROM mysql('172.16.0.40:3306', 'clickhouse', 'invoice_order', 'ch_repl', 'ch_repl')
2021-08-17 10:29:15 - synch.replication.etl:114 - INFO - full data etl for clickhouse.invoice_order success
[root@localhost ~]#
配置文件如上写,但是直接运行 只同步了一张表,前面的那一张表 没有同步完成

@guiqiang179
Copy link
Author

用了最新版本之后 问题解决了,thanks 作者。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants