Skip to content

Commit

Permalink
dm: update full doc about extend routes (#11936)
Browse files Browse the repository at this point in the history
  • Loading branch information
lichunzhu authored Nov 8, 2022
1 parent daf192a commit 2779782
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dm/task-configuration-file-full.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ routes: # 上游和下游表之间的路由 table rout
table-pattern: "t_*" # 表名匹配规则,支持通配符 "*" 和 "?"
target-schema: "test" # 目标库名称
target-table: "t" # 目标表名称
# 可选配置:提取各分库分表的源信息,并写入下游用户自建的列,用于标识合表中各行数据的来源。如果配置该项,需要提前在下游手动创建合表,具体可参考 “table routing 文档” <https://docs.pingcap.com/zh/tidb/dev/dm-key-features#table-routing>。
# extract-table: # 提取分表去除 t_ 的后缀信息,并写入下游合表 c_table 列,例如,t_01 分表的数据会提取 01 写入下游 c_table 列
# table-regexp: "t_(.*)"
# target-column: "c_table"
# extract-schema: # 提取分库去除 test_ 的后缀信息,并写入下游合表 c_schema 列,例如,test_02 分库的数据会提取 02 写入下游 c_schema 列
# schema-regexp: "test_(.*)"
# target-column: "c_schema"
# extract-source: # 提取数据库源实例信息写入 c_source 列,例如,mysql-replica-01 数据源实例的数据会提取 mysql-replica-01 写入下游 c_source 列
# source-regexp: "(.*)"
# target-column: "c_source"
route-rule-2:
schema-pattern: "test_*"
target-schema: "test"
Expand Down

0 comments on commit 2779782

Please sign in to comment.