getindata / kafka-connect-iceberg-sink

Apache License 2.0
77 stars 28 forks source link

How to ingest decimal types from postgres #25

Open anistal opened 1 year ago

anistal commented 1 year ago

Firt of all: thanks for your work in this usefull project.

I would like to ingest a table from postgres that has a decimal column with precision using Debezium and this iceberg-sink. Every time that i have tried, the sink is creating a binary iceberg column instead of a decimal with precision (I guess that it is due to https://debezium.io/documentation/reference/2.1/connectors/postgresql.html#postgresql-decimal-types)

Is there any way or workaround to get it as decimal with precision instead of a binary?

Thanks in advance!

almir-magazord commented 1 year ago

Hi! We had the same problem.... try adding the following line in config:

"decimal.handling.mode": "double"

Tell us if worked for you!