Wildcards in table mapping - excluding `_`

0

I want to exclude several tables (Aurora Postgres) from DMS replication. All the tables I want to exclude have suffixes __f or __b. Where _ is special char for DMS table mappings. I try to use regex as :

  • %#_#_b
  • %[_][_]b

None of the above is working for me.

Example of my mapping rule:

{
       "object-locator": {
           "schema-name": "%",
           "table-name": "%[_][_]b"
       },
       "rule-action": "exclude",
       "rule-id": "1",
       "rule-name": "exclude_b",
       "rule-type": "selection"

},

Kamil M
已提问 9 个月前422 查看次数
1 回答
0

Hi, I am afraid that '%' is greedy here: it eats all characters up to the end including the suffixes that you are looking for.

So, you may want to try something like _______[_][_]b with _______ matching the exact number of chars of 1 of your tables with suffix _b to exclude to confirm the greedyness of %.

If confirmed, you can create such an exclusion rule for all possible name lengths of your use case. Yes, I know that it it not elegant but at least it's a workaround. In parallel, I would open a ticket with AWS Support to see if they have a better solution or can fix the greedyness of %.

Best,

Didier

profile pictureAWS
专家
已回答 9 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则