Question
canal版本
1.1.7
问题描述
- 想要增量同步test0718库的数据到改名的库test0723中,如何写dbMapping配置, 目前只要指定表名才能正常同步,配置如下:
concurrent: true
dataSourceKey: demoSyncDS
destination: test-1721045534
groupId: g1
outerAdapterKey: mysql0
dbMapping:
commitBatch: 3000
database: test0718
targetDb: test0723
table: t1
targetTable: t1
mapAll: true
targetPk:
id: id
- 尝试了以下好几种配置都不行,以下是错误配置
错误配置1:
concurrent: true
dataSourceKey: demoSyncDS
destination: test-1721045534
groupId: g1
outerAdapterKey: mysql0
dbMapping:
commitBatch: 3000
database: test0718
targetDb: test0723
错误配置2
concurrent: true
dataSourceKey: demoSyncDS
destination: test-1721045534
groupId: g1
outerAdapterKey: mysql0
dbMapping:
commitBatch: 3000
database: test0718
targetDb: test0723
table: *
targetTable: *
1条答案
按热度按时间mi7gmzs61#
建议用mirror模式,数据库也同名