Can the original table be uniformly prefixed during DM table routing?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: DM表路由时能统一把原表加个前缀?

| username: Jaimyjie

[TiDB Usage Environment] Testing
[TiDB Version] 6.1.5

Is there any way in DM to batch route all tables from the source table (individually routing each table is not a problem, but there are many tables, so I want a unified method) and add a prefix to the target table?
For example: all source tables start with tb_, and after reaching the target table, the table names should start with shop_tb_.

The main issue is that I need to merge several databases into one, but each database has many tables with the same names, so I want to add a prefix to each database’s tables to distinguish them.

| username: Lucien-卢西恩 | Original post link

Can this solution be used as a reference?

| username: okenJiang | Original post link

I suggest you feed the DM routing usage to ChatGPT, then input all your tables to ChatGPT, and let ChatGPT help you generate the task configuration file :drooling_face:

| username: Hacker007 | Original post link

The database is fine, but there are too many tables.

| username: Anna | Original post link

Write a statement to batch rename tables SQL批量修改表名_sql 批量修改表前缀名称-CSDN博客

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.