airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
14.91k stars 3.83k forks source link

[destination-postgres] Source Postgres NUMERIC column value replicated as NULL in Postgres Destination #38470

Open BernalCarlos opened 1 month ago

BernalCarlos commented 1 month ago

Connector Name

destination-postgres

Connector Version

2.0.9

What step the error happened?

During the sync

Relevant information

I’m having an issue syncing some numeric fields from a Postgres source to a Postgres destination. The fields are being synced as null on the destination.

Reading the _airbyte_meta column, the problem is supposed to be some sort of type mismatch but it makes little sense to me since the type on the source is numeric(30, 5) and the type on the destination set by Airbyte is numeric(38, 9). The types are compatible (as far as I know).

{"changes": [{"field": "platformFee", "change": "NULLED", "reason": "DESTINATION_TYPECAST_ERROR"}, {"field": "baseCreditAmount", "change": "NULLED", "reason": "DESTINATION_TYPECAST_ERROR"}, {"field": "excessCreditAmount", "change": "NULLED", "reason": "DESTINATION_TYPECAST_ERROR"}]}

Interestingly enough, Airbyte setting these fields to null only happens on subsequent incremental syncs. The initial sync has no problems, and the fields are not nulled.

The sync mode for the table with the problem is set as Incremental - Append + Deduped, and the source postgres DB update method is set to Read Changes using Write-Ahead Log (CDC)

The fields should not be nulled.

Relevant log output

No response

Contribute

marcosmarxm commented 1 month ago

Hello @BernalCarlos can you provide what version of Postgres are you using as the source connector version?

BernalCarlos commented 1 month ago

Hi @marcosmarxm

Sure.

Source Postgres DB version: 15.5 Source Airbyte conector version: 3.3.32

Destination Postgres DB version: 15.5 Destination Airbyte connector version: 2.0.9

gerritvanzyl commented 4 days ago

Im having the same issue here - has any progress been made yet?