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
gefragt vor 10 Monaten466 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 10 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen