MeltanoLabs / MeltanoLabs/target-postgres
sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13
- Forks
- 23
- Avg merge
- 4h 45m
- Merged PRs (30d)
- 4
Description
I'm getting this error when running a pipeline from a custom tap build on the SDK (tap-pipedrive).
sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "leads_pkey"
DETAIL: Key (id)=(8e7e49f0-affa-11ee-842e-53335752a2c3) already exists.
I've double checked the results of the tap and it doesn't seem to be sending duplicates. This error occurs on the first record of the stream. Does this target not overwrite pre-existing rows?
Supposedly this issue was already raised with #28 and fixed with #29 but if so, I'm not sure why I'm getting this ...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the target-postgres handling for the first record of a stream and reproduce the tap-pipedrive case with an existing leads_pkey row. Compare the behavior and expected result with issues #28 and #29; done means establishing whether pre-existing rows should be overwritten and resolving the reported UniqueViolation accordingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python, sqlalchemy
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100