Hello guys, I'm trying to load the data from my ta...
# troubleshooting
c
Hello guys, I'm trying to load the data from my tap to target-postgres and always insert the records as new ones even if they existed before (only insert, no upsert). Can you guide me, please? The goal is to have in the end an history of the data through time 🙂
d
Are you passing a
job_id
to
meltano elt
so that it can relate a previous run’s state to the current one? See https://meltano.com/docs/integration.html#incremental-replication-not-running-as-expected
c
The fact is that, the tap is catching up from the previous bookmark, but overwriting the current records that are saved into the postgres database instead of writing them as new ones. Maybe I should change the primary key to that it won't happen? Also i've been using both --job-id parameter and the UI. None seems to work
d
target-postgres (and most other targets) will update records with a matching primary key instead of creating new ones, since the primary key indicates that the newly extracted record provides updated information for the same underlying record. If you don’t want that behavior, you want a different primary key
c
@douwe_maan, Thanks, I found that out. I've added a uuid as primary key now! 🙂