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
preguntada hace 10 meses466 visualizaciones
1 Respuesta
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
EXPERTO
respondido hace 10 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas