AWS – Database Migration Service – Wildcard Include and Exclude Table
AWS Database Migration Services(DMS) provides an easy to use the web interface to create a database migration task.
One can do wildcard include(All tables in a Schema) and exclude certain tables. DMS provides an option to Map Tables via Wizard or JSON Editor.
Here is how the UI looks like:
While it is less effort in creating one database migration task with all tables belonging to one schema also know as wildcard include, for all practical reasons, you may want to move certain tables to a different task. For example, exclude tables without primary keys to a different task. This can be achieved using the Table Mapping Wizard. But when you have too many tables to be excluded, using Mapping Wizard is not an easy option, so an alternative approach is using JSON Editor.
Here is an example of JSON to include schema SCOTT and exclude tables – STG_EMP_TASKS, STG_EMP_BENEFITS, and STG_EMP_ASSIGNMENTS