- About DM
- What is DM?
- Basic Features
- Advanced Features
- Merge and Migrate Data from Sharded Tables
- Migrate from MySQL Databases that Use GH-ost/PT-osc
- Filter Certain Row Changes Using SQL Expressions
- DM Architecture
- Benchmarks
- Quick Start
- Deploy
- Maintain
- Tools
- Cluster Upgrade
- Manage Data Source
- Manage a Data Migration Task
- Manually Handle Sharding DDL Lock
- Manage Schemas of Tables to be Migrated
- Handle Alerts
- Daily Check
- Usage Scenarios
- Troubleshoot
- Performance Tuning
- Reference
- Secure
- FAQ
- Glossary
- Release Notes
Table Selector
Table selector provides a match rule based on wildcard characters for schema/table. To match a specified table, configure schema-pattern
/table-pattern
.
Wildcard character
Table selector uses the following two wildcard characters in schema-pattern
/table-pattern
:
The asterisk character (
*
, also called "star")*
matches zero or more characters. For example,doc*
matchesdoc
anddocument
but notdodo
.*
can only be placed at the end of the word. For example,doc*
is supported, whiledo*c
is not supported.
The question mark (
?
)?
matches exactly one character except the empty character.
Match rules
schema-pattern
cannot be empty.table-pattern
can be empty. When you configure it as empty, onlyschema
is matched according toschema-pattern
.- When
table-pattern
is not empty, theschema
is matched according toschema-pattern
andtable
is matched according totable-pattern
. Only when bothschema
andtable
are successfully matched, you can get the match result.
Usage examples
Matching all schemas and tables that have a
schema_
prefix in the schema name:schema-pattern: "schema_*" table-pattern: ""
Matching all tables that have a
schema_
prefix in the schema name and atable_
prefix in the table name:schema-pattern = "schema_*" table-pattern = "table_*"
What’s on this page
Was this page helpful?