ZJONSSON/node-etl

Postgres upsert non-functional.

Go2ClassPoorYorick opened this issue · 1 comments

Feeding a stream containing existing Postgres pkeys to etl.postgres.upsert results in a duplicate key error, instead of an upsert statement. Manually adding the primary keys to the postgres script.js file and removing the "IF" statement around it (line 100) allows it to work. It would appear that primary keys are not properly being grabbed/fed to this function.

I may attempt to troubleshoot if I have time, but I'm just bringing it to your attention.

ETL Pipe:
etl.postgres.upsert(pool,'public','testdumps',{concurrency:4 });
Error when existing record piped to above:
ERROR: duplicate key value violates unique constraint "testdumps_pkey"

Additionally: my sql logs support my theory that line 101 is not being executed, as the SQL logs don't include an "ON CONFLICT" statement for these errors.