0

I have one issue with datetime format -it is my nigh mare.

In my ksqlDB I am receiving time from my CSV in this format

enter image description here

but when I would like to transfer those datetime format to MySQL DB via SINK connector I am receiving error 'Error: java.sql.SQLException: Exception chain: connect | java.sql.BatchUpdateException: Data truncation: Incorrect datetime value: '2022-01-04T13:18:19.990Z' for column 'DATUM' at row 1 connect | com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect datetime value: '2022-01-04T13:18:19.990Z' for column 'DATUM''

enter image description here

My table looks like:

CREATE TABLE IF NOT EXISTS income-csv ( ID MEDIUMINT NOT NULL AUTO_INCREMENT, DATUM DATETIME NOT NULL, UCET VARCHAR (24) NOT NULL, VS INT NOT NULL, SUMA INT NOT NULL, PRIMARY KEY(ID) );

Pls. could somebody help me how to convert this datetime format via ksqldb or via connector? Thank you.

Shadow
  • 32,277
  • 10
  • 49
  • 61

0 Answers0