I have an invoice line item table with a non-key field Invoice #. Some lines have the same invoice number. These lines with the same invoice number are usually entered by the user at the same time (because there's more than one line per invoice).
I want to use a pipeline to create an invoice header from the lines. I have a table with a custom key that is that invoice #. Of course it needs to be unique. I know that if I use upsert I can insert new invoice headers and update existing ones.
Right now I have my filter set to pull all invoice lines added in the last few minutes. But some in that set will have duplicate invoice numbers, and the upsert does not allow this within the same commit - it errors out on the duplicate key.
Is there a way to commit one record at a time with upsert? Or should I be doing this a different way?