【问题标题】:Kafka connect with mysql custom queryKafka 连接 mysql 自定义查询
【发布时间】:2019-08-08 01:12:23
【问题描述】:

我在 kafka connect 的帮助下完成了增量数据同步。 现在我想通过自定义查询来实现相同的目标。但我遇到了错误。

我的配置文件是

name=mysql-whitelist-timestamp-source
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector 
tasks.max=1 
connection.url=jdbc:mysql://127.0.0.1:3306/demouser=root&password=root 
query=select name from students3 where marks = 10 
mode=timestamp table.whitelist=students3 
timestamp.column.name=timestamp 
topic.prefix=test-mysql-jdbc-

然后出现以下错误:

ERROR WorkerConnector{id=mysql-whitelist-timestamp-source} 出错时 起始连接器 (org.apache.kafka.connect.runtime.WorkerConnector:119) org.apache.kafka.connect.errors.ConnectException:查询可能不是 结合全表复制设置。

【问题讨论】:

    标签: apache-kafka apache-kafka-connect


    【解决方案1】:

    我们不应该在自定义查询中使用标签 table.whitelist。查看完整的explanation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-06-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-28
      • 1970-01-01
      • 1970-01-01
      • 2022-01-09
      相关资源
      最近更新 更多