SAP / kafka-connect-sap

Kafka Connect SAP is a set of connectors, using the Apache Kafka Connect framework for reliably connecting Kafka with SAP systems
Apache License 2.0
119 stars 54 forks source link

Unable to use Incrementing Column type DECIMAL for HANA Source Connector #92

Closed srkpers closed 2 years ago

srkpers commented 2 years ago

We have a table in HANA with one of the Field type as DECIMAL and unable to use that field as incrementing column. Here is the error message from the connector log

java.lang.IllegalArgumentException: The Incrementing column ZSLTTMSTPL is of unsupported type metaAttr(ZSLTTMSTPL,3,1,22,6,true).dataType at com.sap.kafka.connect.source.querier.IncrColTableQuerier.$anonfun$getIncrementingColumn$1(IncrColTableQuerier.scala:97) at com.sap.kafka.connect.source.querier.IncrColTableQuerier.$anonfun$getIncrementingColumn$1$adapted(IncrColTableQuerier.scala:89) at scala.collection.immutable.Vector.foreach(Vector.scala:1856) at com.sap.kafka.connect.source.querier.IncrColTableQuerier.getIncrementingColumn(IncrColTableQuerier.scala:89) at com.sap.kafka.connect.source.querier.IncrColTableQuerier.(IncrColTableQuerier.scala:21) at com.sap.kafka.connect.source.GenericSourceTask.$anonfun$start$8(GenericSourceTask.scala:121) at com.sap.kafka.connect.source.GenericSourceTask.$anonfun$start$8$adapted(GenericSourceTask.scala:99) at scala.collection.immutable.List.foreach(List.scala:333) at com.sap.kafka.connect.source.GenericSourceTask.start(GenericSourceTask.scala:99) at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:232) at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:189) at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:238) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)

Here is the details for that field. Field Name - ZSLTTMSTPL SQL Data Type - DECIMAL Dimension - 22,6 Column Store Data Type - FIXED

The connector documentation indicates we can use DECIMAL field as incrementing column but it is not working for us. Any input on how to get this working?

elakito commented 2 years ago

I don't know why decimal was not included in the list. I just added it.

elakito commented 2 years ago

@srkpers Thank you reporting this issue. The fix has been merged to master.

srkpers commented 2 years ago

Thank you very much. I did some initial testing and looks good.