MeltanoLabs / target-postgres

MIT License
11 stars 20 forks source link

fix: Use tuples for pkey check #446

Closed SpaceCondor closed 1 month ago

SpaceCondor commented 1 month ago

https://github.com/MeltanoLabs/target-postgres/blob/d07b41583e8ff77ee770a0d40779ea9485772461/target_postgres/sinks.py#L161-L169

Currently the code above uses string concatenation to check for duplicate primary key values, however this is problematic since the records below will be treated as the same record and the first will be omitted:

Record 1:

Record 2:

Changing to a tuple should mitigate this.

edgarrmondragon commented 1 month ago

~hmm tests are no longer running on PRs from forks...~

Nevermind: https://github.com/MeltanoLabs/target-postgres/pull/447

edgarrmondragon commented 1 month ago

Thanks @SpaceCondor!