简体   繁体   English

Kafka JDBC Source Connector是否无法通过sql查询从mysql读取数据?

[英]Kafka JDBC Source Connector is not reading data from mysql with sql query?

I have created a local database for testing purpose on MySQL. 我已经创建了一个本地数据库,用于在MySQL上进行测试。 When I'm trying to read the data from the database, it's reading fine. 当我尝试从数据库中读取数据时,它的读取很好。 When I use the SQL query in connector configuration, it's just running but not reading any data from the database. 当我在连接器配置中使用SQL查询时,它只是在运行,而没有从数据库中读取任何数据。 Any idea what might cause this? 知道是什么原因造成的吗?

Here is my connector config: 这是我的连接器配置:

name=just-like
acks=0 
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
key.converter=io.confluent.connect.avro.AvroConverter
key.converter.schema.registry.url=http://localhost:8081
value.converter=io.confluent.connect.avro.AvroConverter
value.converter.schema.registry.url=http://localhost:8081
connection.url=jdbc:mysql://localhost:3306/DBtest?user=**&password=**
connection.user=**  
connection.password=**  
table.whitelist=test
mode=timestamp  
timestamp.column.name=createddate  
query= select column_name from table_name  
validate.non.null=False 
topic.prefix=sql-

Database Schema 数据库架构

在此处输入图片说明

We shouldn't use the tag table.whitelist with the custom query. 我们不应在自定义查询中使用标签table.whitelist If you want to use the query tag, I suggest removing the table.whitelist tag. 如果要使用查询标记,建议删除table.whitelist标记。 You can't use them both together. 您不能同时使用它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 JDBC 源连接器中设置偏移量以从 Kafka 中的 MySQL 表中获取所有数据 - How to set offset to beginning in JDBC Source Connector to fetch all data from MySQL table in Kafka 如何使用Confluent Kafka JDBC源连接器从Amazon EC2实例中提取数据? - How to pull data from amazon EC2 instance using Confluent Kafka JDBC source connector? 使用JDBC连接器5.1从Java读取/写入MySQL中的UTF-8数据时出现问题 - Problems reading/writing UTF-8 data in MySQL from Java using JDBC connector 5.1 kafka JDBC MySQL源连接器是否需要在本地主机上具有MySQL Server? - Does the kafka JDBC MySQL source connector need to have MySQL Server on localhost? (查询)通过使用Arduino SQL连接器将数据更新到MYSQL - (QUERY) UPDATE data into MYSQL by using Arduino SQL connector Confluent Kafka Connect MySQL 接收器连接器的开源替代方案? - Open Source alternative for Confluent Kafka Connect MySQL Sink Connector? MySQL JDBC连接器无法编译? - MySQL JDBC Connector not compilable? 汇合 jdbc-source-connector 无法从 Java - confluent jdbc-source-connector not working from Java 使用JDBC连接器在Java中的一个查询中进行多次选择 - Multiple selects in one query in java with jdbc connector-Mysql Confluent JDBC Source 连接器的问题 - Issue with Confluent JDBC Source connector
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM