1

I'm using PostgreSQL. In my table numeric column defined like this:

"net_weight" numeric(19,2)

But in Kafka, I'm receiving instead of decimal numbers (E.g. 14.0) I'm getting something like "E4g="

versions: debezium/connect:0.7 kafka 0.11.0.0 zookeeper 3.4.9

does someone know how to solve this issue?

Vivek S.
  • 19,945
  • 7
  • 68
  • 85
Andrii Fedorenko
  • 153
  • 2
  • 11

1 Answers1

3

NUMERIC column can be encoded as BigDecimal binary value (that you see now), double or string. Please see decimal.handling.mode configuration option. You either need to decode the value back - https://debezium.io/docs/faq/#how_to_retrieve_decimal_field_from_binary_representation or you can use the other formats. Beware in case of double you risk losing precision.

Jiri Pechanec
  • 1,816
  • 7
  • 8
  • 1
    I've set `decimal.handling.mode` to `string` or `double` for `money` type and it still shows up as decimal in the avro schema. any idea? – collarblind Mar 06 '21 at 01:06