airbytehq / airbytehq/airbyte

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

Ouverte
#38,470 19 commentaires 5 réactions 0 personnes assignées Voir sur GitHub
area/connectors community connectors/source/postgres team/db-dw-sources type/bug
Langage dominant
Python
Étoiles
22.1k
Forks
5.4k
Merge moyen
5 h
PR mergées (30 j)
671

Description

### 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).

```json
{"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

- [ ] Yes, I want to contribute

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.