Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tidb同步n张表到kafka,配置文件该怎么写?
【TiDB Usage Environment】Testing
【TiDB Version】v5.4.1
【Encountered Problem】
Some tables in the TiDB sync database are being synchronized, but it was found that other tables that do not need to be synchronized are also being synchronized!
The configuration file is written as follows! Could you please point out where the configuration might be incorrect?
For the rules, you can add “!non-synchronized tables” at the end, for example:
rules = [‘.’, ‘!test.']
rules = ['a.’, ‘!a.abc’]
Thank you for the explanation! But this database has 150 tables! I only need to sync about 10 tables. Do I have to write down all the remaining tables? rules = [‘siteadmin.*’, !siteadmin.write the remaining 100+ tables that do not need to be synced]
Just write the tables to be synchronized in the rules, and remove the exclamation mark.
Yes, just write the synchronized tables like this:
rules = [‘a.b’, ‘!a.c’, ‘a.d*’]
Got it! Thanks for the guidance! It means to list all the tables that need to be synchronized.
You’re welcome, this should work.