How to Handle More Fields in Upstream Sharding Tables than in Downstream Merged Tables in DM

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

Original topic: DM上游分表比下游合表字段多如何处理

| username: qinzixuan

【TiDB Usage Environment】Production\Test Environment\POC
【TiDB Version】5.4
【Encountered Problem】
The upstream MySQL performs partitioning by month, and we plan to use DM to synchronize the partitioned data into TiDB as a single table. The partition for June 2021 has three more columns than the other partitions. If we add these three columns to the downstream table and handle it according to the migration scenario where the downstream has more columns, we will have to set the schema for the upstream partition every month when a new partition is generated. Is there a good solution or new approach for this?

| username: sunzhaoyang | Original post link

The scenario of multiple upstream columns is not yet supported.

| username: qinzixuan | Original post link

Okay, thank you.

| username: qinzixuan | Original post link

Is there a function that can use regex to match related SQL and convert it into downstream table structure statements? The three extra fields are actually useless.

| username: Hacker007 | Original post link

The smallest granularity in a DM task is the table.

| username: xiaohetao | Original post link

Currently, there is none.

| username: system | Original post link

This topic was automatically closed 1 minute after the last reply. No new replies are allowed.