首页 > 解决方案 > Debezium 错误:ConnectException:数据行小于列索引

问题描述

这个错误现在出现在我所有的 debezium 连接器上(在 sql-server 上),我试图清除一些 K-Connect 主题以清除元数据但没有运气,感谢任何帮助......感觉元数据在我需要重置的 sql-server 端?...

错误:数据行小于列索引,内部架构表示可能与真实数据库架构不同步

[2019-08-16 20:13:14,745] ERROR Error requesting a row value, row: 8, requested index: 8 at position 8 (io.debezium.relational.TableSchemaBuilder)
[2019-08-16 20:13:14,746] ERROR Producer failure (io.debezium.pipeline.ErrorHandler)
org.apache.kafka.connect.errors.ConnectException: Data row is smaller than a column index, internal schema representation is probably out of sync with real database schema
        at io.debezium.relational.TableSchemaBuilder.validateIncomingRowToInternalMetadata(TableSchemaBuilder.java:209)
        at io.debezium.relational.TableSchemaBuilder.lambda$createValueGenerator$2(TableSchemaBuilder.java:235)
        at io.debezium.relational.TableSchema.valueFromColumnData(TableSchema.java:145)

标签: sql-serverapache-kafkaapache-kafka-connectdebezium

解决方案


我相信您的源表架构不符合 CDC 中的更改表架构。您最近是否更新了表模式?您是否关注过https://debezium.io/docs/connectors/sqlserver/#schema-evolution?如果不是,您可能应该通过从偏移量主题中删除连接器偏移量并清理在database.history.kafka.topic. 并且不要忘记这个主题必须是每个连接器的唯一主题!

J。


推荐阅读