Kafka JDBC源连接器 [英] Kafka JDBC source connector
问题描述
我正在尝试JDBC源连接器以从SQL Server获取数据.
I'm trying the JDBC source connector to get data from SQL Server.
我收到错误提示
错误无法为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
获取错误详细信息,则会收到错误的网址,该网址格式错误,我认为这是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屋!