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
asked 9 months ago400 views
1 Answer
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
EXPERT
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions