'Error creating kafka sink connector, How to create a connector using timestamp mode?
I am building kafka using AWS MSK service. I am trying to copy data from source DB to target DB data. The cluster has been created. And the source connector is also created, but an error occurs when creating the sink connector.
- org.apache.kafka.connect.errors.ConnectException: Tolerance exceeded in error handler
- Caused by: org.apache.kafka.connect.errors.DataException: Only Struct objects supported for [converting timestamp formats], found: java.lang.String
*If I give the option "errors.tolerance=all" in the sink connector config, the connector is created normally, but no data is entered in the targetDB.
[source connector config]
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
timestamp.column.name=DATE
mode=timestamp+incrementing
incrementing.column.name=NAME
topic.prefix=kafka_
validate.non.null=false
connection.password=123456
tasks.max=1
connection.user=testuser
connection.url=jdbc:mysql://Sourcedb:3306:test
table.whitelist=test_table
[sink connector config]
connector.class=io.confluent.connect.jdbc.JdbcSinkConnector
transforms.TimestampConverter.target.type=Timestamp
table.name.format=test.test_table
connection.password=12345
transforms.TimestampConverter.field=DATE
tasks.max=1
topics=kafka_test
transforms.TimestampConverter.type=org.apache.kafka.connect.transforms.TimestampConverter$Value
transforms=TimestampConverter
transforms.TimestampConverter.format=yyyy-MM-dd HH:mm:ss
auto.evolve=false
connection.user=dbuser
auto.create=false
connection.url=jdbc:mysql://Targetdb:3306:test
insert.mode=insert
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
