"duplicate key value violates unique constraint" on bulk upsert via primary key function

Hey @Anish_Srinivasan! Thanks for reaching out - and welcome to Retool. :slight_smile:

I'm digging into this now and am unable to immediately replicate your issue, albeit it with a much simpler use case. This might just be a syntax issue - should _.map(waystar_payer_list, e => [{ ... }] be _.map(waystar_payer_list, e => ({ ... }) instead? The former is returning an array of arrays with a single element, whereas the latter returns an array of objects and seems like the more logical option.

2 Likes