Include and Exclude in the same AWS DMS Selection Rule

104 Views Asked by At

Look at this rule: {       "rule-type": "selection",       "rule-id": "8",       "rule-action": "exclude",       "object-locator": {         "table-name": "%_temp%",         "schema-name": "plf"       },       "rule-name": "8"     }

Now I want to edit this rule in such a way that it only takes the table xyz_temp but excludes all others with "%_temp%" in it.

In order to create another rule for doing it, we need to create a new DMS task. Therefore I wanted to see if there is any possibility of achieving this in a single rule.

I asked ChatGPT the same question and this was the response that I got: {   "rule-type": "selection",   "rule-id": "8",   "rule-action": "include",   "rule-name": "8",   "object-locator": {     "schema-name": "plf"   },   "exclude-object-pattern": "%_temp%",   "include-objects": [     {       "schema-name": "plf",       "table-name": "xyz_temp"     }   ] }

Not sure if that would work because I did not find anything like exclude-object-pattern in the docs!

1

There are 1 best solutions below

1
Noorul On

If you want to migrate data only from table xyz_temp, you just specify only that table in the selection rule. DMS task migrates data only from whichever table mentioned in the mapping rule. You don’t need to have a exclude rule if you want to migrate only from xyz_temp, when you specify the table name in the mapping rule.