Uploaded image for project: 'Instrument control development'
  1. Instrument control development
  2. INSTRM-2821

Possibly code up a proper bulk COPY for the pfs.utils.database package.

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done (View Workflow)
    • Priority: Normal
    • Resolution: Done
    • Component/s: pfs_utils
    • Labels:
      None

      Description

      An `insert_dataframe` for `cobra_target` is failing, I think due to the crazy way that dataframes are encoded over the wire. In practice, the dataframe is 9-13 "iterations" of 2394 instances of `cobra_target`. It is failing with 9 iterations, or 21546 rows of 9 columns. The error is

      text="command failed: OperationalError('(psycopg.OperationalError) sending query and params failed: number of parameters must be between 0 and 65535') in execute() at /software/stack_2025-06-13/conda/envs/rubin10-ics/lib/python3.12/site-packages/psycopg/cursor.py:97"
      

      So maybe a COPY method is needed after all.

        Attachments

          Activity

            People

            • Assignee:
              wtgee Wilfred Gee
              Reporter:
              cloomis cloomis
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: