DM 只同步上游某一个 MySQL 实例的库要如何配置task文件?

比如说从上游的 MySQL 实例只同步 sbtest1 的库, 其他库的 event 需要跳过。

https://pingcap.com/docs-cn/v3.0/reference/tools/data-migration/configure/task-configuration-file/#功能配置集

文档的内容看起来不太清晰。

尝试调整了配置, 一直遇到如下报错

[ERROR] [subtask.go:253] [“unit process error”] [subtask=replication-mysql] [unit=Sync] [“error information”="{“msg”:"[code=10005:class=database:scope=downstream:level=high] query statement failed: SHOW COLUMNS FROM sbtest.ftest: Error 1146: Table ‘sbtest.ftest’ doesn’t exist

sbtest 库是需要跳过, 不同步的, 需要同步的是 sbtest1 库.

你好: (1)你只需要配置sbtest1库,可以在配置的时候,指定就使用sbtest1即可,不需要配置* route-rule-1: schema-pattern: “sbtest1” table-pattern: “t_*” target-schema: “test” target-table: “t” route-rule-2: schema-pattern: “sbtest1” target-schema: “test”

  (2)或者在black-white-list中配置,将sbtest配置到ignore-dbs中
black-white-list:                                   # 该上游数据库实例匹配的表的 black & white list 过滤规则集。
  bw-rule-1:
    do-dbs: ["~^test.*", "user"]
    ignore-dbs: ["sbtest", "account"]
    do-tables:
    - db-name: "~^test.*"
      tbl-name: "~^t.*"
    - db-name: "user"
      tbl-name: "information"
    ignore-tables:
    - db-name: "user"
      tbl-name: "log"

如果不想同步的表很多的话, 那 ignore-dbs 要怎么写? 只能依靠正则表达式来处理么? 如果不写的话, 是不是除了 do-dbs 以外其他的都会默认 ignore?

黑白名单过滤规则中,是先判断 do-schema/do-table,如果匹配就同步

可以参考官网该部分内容:
https://pingcap.com/docs-cn/dev/reference/tools/data-migration/features/overview/#table-routing

thx, 我仔细读一下这个文档

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。