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

Bytes to Decimal Conversion issue from SAP to Kafka #104

Closed Mahi4089 closed 2 years ago

Mahi4089 commented 2 years ago

Hi ,

we are trying to get the data from SAP using KAFKA connect, the connector is working fine but the decimals are being converted into bytes.

{ "schema": { "type": "struct", "fields": [ { "type": "string", "optional": false, "field": "MATNR" }, { "type": "string", "optional": false, "field": "VOLEH" }, { "type": "bytes", "optional": false, "name": "org.apache.kafka.connect.data.Decimal", "version": 1, "parameters": { "scale": "1" }, "field": "VOLTO" } ], "optional": false, "name": "query149248027" }, "payload": { "MATNR": "AXU16301-3-SM", "VOLEH": "IN3", "VOLTO": "AA=="

Please find the below connect properties that are being used.

name=dev-topic-source_mara_query_3 connector.class=com.sap.kafka.connect.source.hana.HANASourceConnector tasks.max=1 topics=dev_mara_query_3 connection.url=jdbc:sap://XXXXXXXXXX connection.user=XXXXXXXXX connection.password=XXXXXXXXX queryMode=query dev_mara_query_3.query=select MATNR,VOLEH,VOLTO from "SAPABAP1"."MARA"

dev_zcvy_1.table.name="SAPABAP1"."ZCVY_LAST_MILE"

dev_zcvy_1.incrementing.column.name=CARRIER_SCAC

numeric.mapping=best_fit_eager_double

Tried various options but none of them have worked. Any help would be much appreciated.

elakito commented 2 years ago

numeric.mapping is not working in HANA connector. Let me have a look.