我们正在使用confluent ms sql cdc连接器,连接描述符为:
curl -X POST -H \
"Content-Type: application/json" --data '{
"name" : "yury-mssql-cdc1",
"config" : {
"connector.class" : "io.confluent.connect.cdc.mssql.MsSqlSourceConnector",
"tasks.max" : "1",
"initial.database" : "test2",
"username" : "user",
"password" : "pass",
"server.name" : "some-server.eu-west-1.rds.amazonaws.com",
"server.port" : "1433",
"change.tracking.tables" : "dbo.foobar"
}
}' \
http://ip-10-0-0-24.eu-west-1.compute.internal:8083/connectors
整个基础设施都部署在aws。。。例外情况是:
查询changekey时引发错误异常
{databasename=test2,schemaname=dbo,tablename=foobar}(io.confluent.connect.cdc.mssql.que)ryservice:94)java.lang.nullpointerexception:sourceoffset不能为null。
任何帮助都将不胜感激。
1条答案
按热度按时间lndjwyie1#
我找到了答案,我认为问题在于sqlservercdc的配置方式。我们不应该使用旧的设置cdc的方法(exec sys.sp\u cdc\u enable\u db和exec sys.sp\u cdc\u enable\u table)
相反,请使用以下命令来配置SQLServerCDC
alter database[db name]set change\u tracking=on(change\u retention=2天,auto\u cleanup=on)go alter database[db name]set allow\u snapshot\u isolation on go alter table[talbe name]enable change\u tracking with(track\u columns\u updated=on)go