Can DMS support selective ignoring of certain binlog commands?

0

There is a command in binlogs like ALTER TABLE t1 DROP PARTITION p0, p1;. I don't wish for DMS to execute this. Is command filtering supported in DMS?

Monica
已提問 7 個月前檢視次數 305 次
2 個答案
0

Hello.

Yes, AWS Database Migration Service (DMS) provides a way to selectively replicate or ignore specific events from source database binlogs. When you create or modify a migration task, you can specify table mappings to determine how specific tables are migrated. Within these table mappings, you can use the action attribute to determine how specific operations on those tables are handled. For example, to ignore ALTER TABLE commands related to dropping partitions on table t1, you'd set up a transformation rule like this:

{
  "rule-type": "transformation",
  "rule-id": "1",
  "rule-name": "1",
  "rule-target": "table",
  "object-locator": {
    "schema-name": "your_schema_name",
    "table-name": "t1"
  },
  "rule-action": "DoNothing"
}

Regards, Andrii

profile picture
專家
已回答 7 個月前
  • So, is the command enough to ignore alter table commands - "rule-action": "DoNothing" I don't wish for all alter commands to be ignored only the ones related to partitioning. The answer seems confusing.

0

The example I provided with "rule-action": "DoNothing" would ignore all operations for the specified table, which is not what you want.

If you specifically want to ignore only the ALTER TABLE DROP PARTITION commands while allowing other alterations and commands to proceed, you won't be able to achieve this directly using DMS's built-in functionalities.

profile picture
專家
已回答 7 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南