You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Debezium Docker Connect中table.include.list配置不生效问题排查求助

Troubleshooting Table Capture Filtering for Debezium SQL Server Connector 1.5

Let's break down the issues you're facing and fix them step by step:

1. Wrong Snapshot Configuration Parameter

First off, the snapshot.include.collection.list setting you tried is not applicable to the SQL Server connector — that's a parameter specifically for MongoDB connectors. This explains why it had no effect. You can safely remove this line from your config.

2. Fix the table.include.list Regular Expression

The table.include.list accepts regular expressions, not just exact table names. Your current value dbo.TEST_A uses an unescaped dot (.), which in regex matches any character. Worse, if you're not using an exact match pattern, the connector might accidentally include unintended tables (though in your case, it's including all tables, which points to another underlying issue).

To ensure only dbo.TEST_A is captured, update the parameter to use an exact regex match:

"table.include.list": "^dbo\\.TEST_A$"

The ^ and $ anchor the pattern to match the full table identifier, while \\. escapes the dot to match the literal schema-table separator.

3. Force a Resnapshot (Critical for Existing Connectors)

If you initially ran the connector without the table.include.list (or with a wrong config), the initial snapshot already captured all tables, and the database history topic (dbhistory.testA) retains that old state. Debezium won't automatically re-apply filtering to existing snapshots. To fix this:

  • Stop the connector.
  • Delete the existing database history topic (dbhistory.testA) from Kafka.
  • Delete all the auto-created table topics (like MyServer.dbo.*) that you don't want to keep.
  • Add the corrected table.include.list to your connector config, and optionally set snapshot.mode=always to force a fresh snapshot on restart:
    "snapshot.mode": "always"
    
  • Restart the connector.

4. Verify No Conflicting Configurations

Double-check your connector config to ensure you don't have a table.exclude.list parameter present. The two parameters are mutually exclusive — if both exist, table.include.list will be ignored entirely, leading to all tables being captured.

5. Validate with Connector Logs

After restarting the connector, check the connector logs for lines like:

Including table dbo.TEST_A
Excluding table dbo.OTHER_TABLE

These lines confirm that the filtering logic is being applied correctly. If you don't see these lines, it means your table.include.list isn't being parsed as expected, and you should double-check the regex syntax.


内容的提问来源于stack exchange,提问作者user3738017

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.29 19:18:12