| title | summary | aliases | |
|---|---|---|---|
Table Selector of TiDB Data Migration |
Learn about Table Selector used by the table routing, binlog event filtering, and column mapping rule of Data Migration. |
|
Table selector provides a match rule based on wildcard characters for schema/table. To match a specified table, configure schema-pattern/table-pattern.
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*matchesdocanddocumentbut notdodo.*can only be placed at the end of the word. For example,doc*is supported, whiledo*cis not supported.
-
The question mark (
?)?matches exactly one character except the empty character.
schema-patterncannot be empty.table-patterncan be empty. When you configure it as empty, onlyschemais matched according toschema-pattern.- When
table-patternis not empty, theschemais matched according toschema-patternandtableis matched according totable-pattern. Only when bothschemaandtableare successfully matched, you can get the match result.
-
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_*"