Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-21201

Research cross-database approach to inserts with custom conflict resolution

    Details

    • Templates:
    • Story Points:
      6
    • Sprint:
      DB_F19_07, DB_F19_10
    • Team:
      Data Access and Database

      Description

      Using SQLAlchemy with SQLite, Oracle, and PostgreSQL backends, write a small Python snippet that bulk-inserts into a table with a primary key or other unique constraints and, depending on an option provided by the caller, either:

      • aborts when the constraint is violated (as usual)
      • ignores new records that conflict with old records
      • replaces old records with new records when conflicts appear.

      This operation needs to be safe in the presence of concurrent inserts into the same table (though in that case we don't care who wins if one or more writers are attempting to replace).

      I am fairly confident all three RDBMSs provide a syntax for this, but it's not the same, and SQLAlchemy support is uneven, so this will in general involve asking SQLAlchemy's connection object for the lower-level RDBMS-specific connection object (or equivalent).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                salnikov Andy Salnikov
                Reporter:
                jbosch Jim Bosch
                Reviewers:
                Jim Bosch
                Watchers:
                Andy Salnikov, Jim Bosch
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel