Kafka 连接 mysql 自定义查询
Kafka connect with mysql custom query
我已经在 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} Error while
starting connector
(org.apache.kafka.connect.runtime.WorkerConnector:119)
org.apache.kafka.connect.errors.ConnectException: query may not be
combined with whole-table copying settings.
我们不应该在自定义查询中使用标签 table.whitelist。查看完整的 explanation.
我已经在 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} Error while starting connector (org.apache.kafka.connect.runtime.WorkerConnector:119) org.apache.kafka.connect.errors.ConnectException: query may not be combined with whole-table copying settings.
我们不应该在自定义查询中使用标签 table.whitelist。查看完整的 explanation.