Uploaded image for project: 'mod-source-record-storage'
  1. mod-source-record-storage
  2. MODSOURCE-48

Spike. Refactoring source_record_view with foreign keys for _id fields

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      EPAM BatchLoader Sprint 15
    • Story Points:
      5
    • Development Team:
      Folijet

      Description

      We need to check performance for source_records_view after refactoring.

      CREATE OR REPLACE VIEW source_records_view AS
        SELECT records._id,
        json_build_object('recordId', records.jsonb->>'id',
                'snapshotId', records.jsonb->>'snapshotId',
      					'recordType', records.jsonb->>'recordType',
      					'deleted', records.jsonb->>'deleted',
      					'additionalInfo', records.jsonb->'additionalInfo',
      					'metadata', records.jsonb->'metadata',
      					'rawRecord', raw_records.jsonb,
       					'parsedRecord', COALESCE(marc_records.jsonb))
      					AS jsonb
         FROM records
           JOIN raw_records ON records.jsonb->>'rawRecordId' = raw_records.jsonb->>'id'
           LEFT JOIN marc_records ON records.jsonb->>'parsedRecordId' = marc_records.jsonb->>'id'
           WHERE records.jsonb->>'parsedRecordId' IS NOT NULL;
      
      • add necessaries foreign keys for records, raw_records, marc_records
      • refactor source_records_view to use *_id in JOINs instead of raw_records.jsonb->>'id'
      • add foreign keys
      • add wiki page

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Anatolii Starkov Anatolii Starkov
                Reporter:
                Anatolii Starkov Anatolii Starkov
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases