Issue with MSSQL to Postgresql replication for decimal values

Summary

Decimal values from MSSQL source table treated as strings in Postgresql causing insert statement failure


Question

HI Everyone,
I am testing a replication from a MSSQL source to a Postgresql destination.
The source table I’m replicating contains columns of type decimal(24,6). These columns are mapped in postgresql as numeric(38,9).
My issue is that all values in the source table that are 0, with one or more decimals, are treated as strings (as I can see in the raw table in the airbyte_internal schema. For example, values are mapped to strings like “0.000”.
Then the insert statement (and hence the sync) fails. The postgresql log shows messages similar to

2024-02-27 20:20:17.639 CET [50783] test@test ERROR: invalid input syntax for type numeric: ""0.000000""
Does anyone know how I can solve this issue ?
Thanks !



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want to access the original thread.

Join the conversation on Slack

["mssql-source", "postgresql-destination", "decimal-values", "replication", "insert-statement-failure"]