Skip to content

DRS API - Legacy Data Synchronization 2026-06-26 #33734

Closed

Description

@doug-lovett

Expanding scope for this ticket to set up this process as a GCP cloud run job - one step closer to automating.

  • Rotate GCP SA keys every month 2026-06-19

Migrate recently added/scanned legacy document records by document class created or updated since the last load.
2026-06-19 New document records:

  • COOP document records last extract date 2026-06-05
  • CORP document records last extract date 2026-06-05
  • FIRM document records last extract date 2026-06-05 (no change)
  • LP_LLP document records last extract date 2026-06-05
  • MHR document records last extract date 2026-06-05 (no change)
  • NR document records last extract date 2026-06-05
  • PPR document records last extract date 2026-06-05 (no change)
  • SOCIETY document records last extract date 2026-06-05

2026-06-19 Existing document records with documents scanned since the last extract:

  • CORP document records last extract date 2026-06-05
  • LP_LLP document records last extract date 2026-06-05
  • NR document records last extract date 2026-06-05
  • SOCIETY document records last extract date 2026-06-05

Business Minio COOP documents migration to DRS
The last migration was on 2026-06-19
Migrate existing minio documents contained in the business database documents table added since the last migration to the DRS.

  • TEST migrate all records added since 2026-06-05
  • PROD migrate all records added since 2026-06-05

Semi-automate this task as a GCP cloud run like job. Needs to run locally for now as running a BCGOV VPN client is required to access the legacy database.
The job description is:
Synchronize legacy document records in the Oracle globalp db correspondence schema with the DRS.
Legacy database access requires running a VPN.
Synchronization is in one direction: from legacy to DRS.
Synchronization is in 2 steps:
1. New document records created since the last time this job ran.
2. Updates to document records that exist in the DRS and where changes have occurred since the last time
this job ran (scanning a document).

Detail:
    Execute a summary query to get the most recent DRS scanned doc timestamp and legacy document record key for
    each DRS document class.
    For each document class:
    1. Fetch new records from the legacy database. For each record:
        a. If there is a legacy document, save it to cloud storage.
        b. Insert into the tracking table staging_legacy_documents with the cloud storage path if available.
        c. Insert into the DRS documents table.
        d. Insert into the DRS document_scanning table if the legacy record includes scanning information.
    2. Fetch updated records from the legacy database that have documents.
        a. Save the legacy document to cloud storage.
        b. Update into the tracking table staging_legacy_documents with the cloud storage path and other data.
        c. Update the DRS documents table.
        d. Insert into the DRS document_scanning table if the legacy record includes scanning information.

    Optionally save csv formatted summary/status information for the job by document class.

Activity

  1. changed the title [-]Copy of DRS API - Legacy Data Synchronization 2026-06-05[/-] [+]DRS API - Legacy Data Synchronization 2026-06-19[/+] on Jun 10, 2026
  2. changed the title [-]DRS API - Legacy Data Synchronization 2026-06-19[/-] [+]DRS API - Legacy Data Synchronization 2026-06-26[/+] on Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions