Forum Discussion

SteveLaurel's avatar
SteveLaurel
Qrew Cadet
2 years ago

Pipeline error - Duplicate Key - does not exist

I am getting errors on a few pipelines saying it can't add to the table due to duplicate key values; however, these values do not exist in the table. QB support is basically saying this is what sometimes happens in a DB with no solutions.

Today I completely deleted the entire table and ran the pipelines again - the same errors.




------------------------------
Steve Laurel
------------------------------

3 Replies

  • The upsert may not contain duplicate keys within the upsert set.  So yes, those values do not already exists, but that is irrelevant for an upsert.  The issue is that the set of record you are trying to upsert has duplicates.

    if that is unavoidable, then change your upsert process to just upsert one record at a time.  Like:

    Prepare a bulk upsert
    add upsert row
    Commit upsert.



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------

    • SteveLaurel's avatar
      SteveLaurel
      Qrew Cadet

      Thanks, Mark.  Here is how it is set up now.



      ------------------------------
      Steve Laurel
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        Right, so you could change that to have inside the for each loop three steps.
        Prepare a bulk upsert
        Add row
        Commit

        Assuming that the cost of the problem is that the JSON data feed has duplicates within it. 



        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------