使用kafka-connect-cdc-mssql

时间:2018-12-20 17:13:58

标签: sql-server apache-kafka apache-kafka-connect confluent cdc

我正在尝试评估MSSQL CDC connector for kafka-connect。我有一个mssql服务器10.x。我正在尝试连接到数据库,并且收到了附加的stacktrace。这是用于连接器的配置:

{
    "name": "test-mssql",
    "config": {
        "connector.class": "io.confluent.connect.cdc.mssql.MsSqlSourceConnector",
        "tasks.max": "1",
        "initial.database": "test",
        "username": "user",
        "password": "password",
        "server.name": "server",
        "server.port": "1433",
        "change.tracking.tables": "dbo.test",
        "errors.log.enable": true
    }
}

错误:

[2018-12-20 16:38:32,602] INFO ChangeKey{databaseName=test, schemaName=dbo, tableName=test}: querying database for metadata. (io.confluent.connect.cdc.mssql.MsSqlTableMetadataProvider)                    
[2018-12-20 16:38:33,211] ERROR Exception thrown while querying for ChangeKey{databaseName=test, schemaName=dbo, tableName=test} (io.confluent.connect.cdc.mssql.QueryService)
    org.apache.kafka.connect.errors.DataException: Exception thrown while getting metadata for ChangeKey{databaseName=test, schemaName=dbo, tableName=test}      
        at io.confluent.connect.cdc.CachingTableMetadataProvider.tableMetadata(CachingTableMetadataProvider.java:64)                 
        at io.confluent.connect.cdc.mssql.QueryService.queryTable(QueryService.java:108)
        at io.confluent.connect.cdc.mssql.QueryService.processTables(QueryService.java:92)
        at io.confluent.connect.cdc.mssql.QueryService.run(QueryService.java:67)
        at com.google.common.util.concurrent.AbstractExecutionThreadService$1$2.run(AbstractExecutionThreadService.java:60)
        at com.google.common.util.concurrent.Callables$3.run(Callables.java:95)
        at java.lang.Thread.run(Thread.java:748)
    Caused by: java.util.concurrent.ExecutionException: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '='.  
        at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)
        at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)
        at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
        at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:137)
        at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2348)
        at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2320)
        at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)

0 个答案:

没有答案