Andy Carter
08/01/2024, 3:53 PMpsycopg2.errors.UniqueViolation: duplicate key value violates unique constraint
Key (id, record_date)=(18013124639396310/insights/comments/lifetime, 2024-08-01) already exists
I've seen this before, and generally it's when I'm trying to upsert a batch and the batch ends up with 2 or more rows with the same primary key. But when I run this tap to `target-jsonl`I can only see one json value with the offending PK combination.
Any reason why target-postgres might be receiving two rows the same, which aren't present if I run locally to target-jsonl ?visch
08/01/2024, 6:34 PMCharles Feduke
08/01/2024, 7:04 PMCharles Feduke
08/01/2024, 7:06 PMCharles Feduke
08/01/2024, 7:07 PMreplication-key when using the replication-method value INCREMENTALAndy Carter
08/01/2024, 8:47 PMtarget-postgres seems to handle upserts fine. It's just a hunch, but actually think it's my tap emitting two records with the same PK to load into pg in the same batch causing the issue.
But yes, the 'no primary key and dedupe everything' would be ideal solution.Andy Carter
08/01/2024, 8:48 PMAndy Carter
08/01/2024, 8:50 PMCharles Feduke
08/01/2024, 8:51 PMCharles Feduke
08/01/2024, 8:52 PMAndy Carter
08/01/2024, 8:55 PMCharles Feduke
08/01/2024, 8:56 PMAndy Carter
08/01/2024, 8:58 PMAndy Carter
08/01/2024, 8:59 PMCharles Feduke
08/01/2024, 8:59 PMAndy Carter
08/01/2024, 9:00 PMMediaInsights with replication_key=None in the stream definition, but in the parent Media stream, replication_key=timestamp.
I actually define a key for the MediaInsights stream in my meltano.yml, as I add a record_date field using an inline mapping.Andy Carter
08/01/2024, 9:02 PMAndy Carter
08/02/2024, 8:35 AM