Closed thibthibus closed 2 years ago
Actually I think the issue is not with the data but with the upsert statement. I check and it fails once the connector processes a record in the topic that has the same key than the one of a previously inserted record. How can I check what the problem is ? The stack doesn't really help.
Changing the issue title as I could clearly reproduce the problem that connector fails when trying to process records that are already existing in the DB. See logs attached 1644421263_56969_EE57B850-A1DA-4978-8A09-F01E066A8475.txt
@thibthibus this is related to https://github.com/SAP/kafka-connect-sap/issues/116. The fixed code treats all string based types compatible but other types such as numeric primitives are still checked strictly. I regret not having added a debug line to show which types are compared. I'll make this quick change.
If you can use the build from the current master which will log the mismatched type in its info log, we can find a solution. I suppose we should treat other types also as compatible as long as the normal JDBC mapping handles the conversion automatically.
Hi @elakito , thanks very much for the changes and your reactivity!!! Really appreciate. I wish I could better understand Scala code and contribute more but I can't...
I built and deployed the 0.9.3-SNAPSHOT jar and can see the log added:
INFO Target type -7 is incompatile with source type 16 (com.sap.kafka.connect.sink.hana.HANASinkTask)
Hope that helps
Regards,
Thibaut
ok. Thanks for testing. We need to update the code to treat BIT(-7) and BOOLEAN(16) as compatible.
Thanks a lot @elakito now everything is working. When do you plan to release these changes in the 0.9.3 ? I haven't found the jars on Maven Central Repo for example. do you publish them somewhere ?
@thibthibus Thanks for verifying this fix. We haven't published the binaries to maven central but this was in plan and we will do it soon. Until now, the binaries are uploaded to the release area of this repo. https://github.com/SAP/kafka-connect-sap/releases
@elakito ok understood. Do you think you will be able to release the 0.9.3 soon ? I can't really get productive with a SNAPSHOT release... Thanks in advance. Thibaut
Hi @elakito , Sorry for asking again. When do you plan to release a newer version of the connector ? Thanks Thibaut
@thibthibus sorry for the delay. I hope to release it by this weekend.
Hi, I have the same issue with others data types. SAP Hana connector is creating the table with some smallint fields but after some inserts, the SAP hana connector validates the schema again and shows an error asking for another data type: "target type 7 is incompatile with source type 8 ". To solve this, I changed the data types to integer and its works but this is not a valid solution in my opinion. Is there a way to deactivate this validation? or any other solution? thanks and sorry to revisited this old threat.
Hi,
The sink connector failed after having processed a few records of a partition of a topic with the following error:
The target HANA table has been created with the following setup of the connector:
Since it worked for a few records I suspect this is caused by a specific record in a topic. I don't find the infos in the connector logs to find which one. Is there a way to change the log level (
DEBUG
?) so that theoffset
&partition
of the record currently processed is logged?Thanks
Regards,
Thibaut