Kafka JDBC 源连接器 [英] Kafka JDBC source connector
问题描述
我正在尝试使用 JDBC 源连接器从 SQL Server 获取数据.
I'm trying the JDBC source connector to get data from SQL Server.
我收到错误提示
ERROR 无法为 etc/kafka-connect-jdbc/source-quickstart-sqlserver.properties 创建作业
ERROR Failed to create job for etc/kafka-connect-jdbc/source-quickstart-sqlserver.properties
我的属性文件如下所示.我错过了什么?
My properties file look like below. What am I missing?
name=test-sqlserver-jdbc-autoincrement
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
tasks.max=1
connection.url=jdbc:sqlserver://******:1433;databaseName=****;user=****l;password=****
table.whitelist=****
mode=incrementing
incrementing.column.name=id
topic.prefix=test-sqlserver-jdbc-
此外,如果我尝试使用 curl http://localhost:8083/JdbcSourceConnector/config/validate
获取错误详细信息,我会收到错误 url 格式错误,我认为这是 kafka 10.2 中的错误.0
Also if I try to get the error details using curl http://localhost:8083 /JdbcSourceConnector/config/validate
, I get error url malformed which I believe is a bug in kafka 10.2.0
推荐答案
如果您处于实验环境中,请尝试以下操作.
if you are on an experimental environment try the following.
connection.url=jdbc:mysql://127.0.0.1:3306/my_db
connection.user=user
connection.password=pass
useSSL=false
还要确保递增的列名是正确的,并且是auto-increment
.
also make sure that the incrementing column name is correct and that it is auto-increment
.
这篇关于Kafka JDBC 源连接器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!