# Using DM - Block & Allow Table Lists

__*Using DM*__
__*DM Block & Allow Table Lists*__

```
block-allow-list:
  bw-rule-1:
    do-dbs: ["test.*", "user"]
    ignore-dbs
    # ignore-dbs: ["mysql", "account"]
    do-tables:
    - db-name: "test.*"
      tbl-name: "t.*"
    - db-name: "user"
      tbl-name: "information"
  bw-rule-2: 
    ignore-tables:
    - db-name: "user"
      tbl-name: "log"
```
-------------------------------------------------------------
The black and white list filtering rule for the upstream DB instance table can be used to filter or migrate only all operations of certain databases/tables.
block-allow-list:
  bw-rule-1: # rule name
    do-dbs: ["Test.*“, “user"] # Which libraries are migrated and which wildcards are supported”*" and "?" , only one do-dbs and ignore-dbs needs to be configured. If both are configured at the same time, only do-dbs will take effect
    # Ignore-dbs: ["mysql", "account"] # Which Libraries to Ignore, Support Wildcards "*" and "?"
    do-tables: # Which tables to migrate, only need to configure one do-tables and ignore-tables. If both are configured at the same time, only do-tables will take effect
    - db-name: "test. *"
      tbl-name: "t.*"
    - db-name: "user"
      tbl-name: "information"
  bw-rule-2: # rule name
    ignore-tables: # which tables to ignore
    - db-name: "user"
      tbl-name: "log"

Parameter explanation
do-dbs: Whitelist of libraries to migrate, similar to replicate-do-db in MySQL.
ignore-dbs: Blacklist of libraries to migrate, similar to replicate-ignore-db in MySQL.
do-tables: Whitelist of tables to migrate, similar to replicate-do-table in MySQL. You must specify both db-name and tbl-name.
ignore-tables: Blacklist of tables to be migrated, similar to replicate-ignore-table in MySQL. You must specify both db-name and tbl-name.
Regular expressions are supported to match library names and table names when the above parameter values start with ~.
