Skip to content

DRS - MHR - Migration from SOFI #23449

Closed
Closed

Description

@arlentees

As a Registries Analyst working with the MHR, I want to be able to have all historical and recent documents available in the modern document record service.

  • Investigate the best way to migrate a batch of data from Oracle to the new GCP service
  • Is SOFI strictly querying the Oracle Document Database or is some of the search criteria coming from a different database?
  • Check that all registrations from Modern MHR have a record in SOFI
  • Coordinate with Home Team to shut down the MHR options in Document Indexing and Searching

Suggested approach for data migration, probably iterative by application:

  1. Export scanning app Oracle database tables. Richard A. has database connection information.
  2. Load the exported Oracle tables into the data warehouse as a PostgreSQL database.
  3. Either export the PostgreSQL tables as csv files to a GCP cloud storage bucket (preferable) or give readonly access to the warehouse database to Assets to load the data into the DRS database.

Thor thinks the doc scanning schema is in the CPRD Oracle database, and suggested engaging David Roberts for the warehouse load work.

After talking to David Roberts, I have access to the PROD Oracle GLOBALP database with VPN running: changing solution to skip the warehouse step.

  • Migrate all MHR document meta data from the legacy Oracle database to a DRS database staging table.
  • For each legacy database pdf document, read the binary data from the database, save it to the MRH cloud storage bucket, then set the cloud storage path to the document in the document record.
  • Verify number of documents in the legacy database matches the number of DRS cloud storage documents.
  • Copy the document records and cloud storage documents from PROD to TEST.

Activity

  1. LizGovier commented on Oct 10, 2024

    @LizGovier

    On hold until we have access to the scanner

  2. doug-lovett commented on Nov 18, 2024

    @doug-lovett
    Collaborator

    @rarmitag can you provide the TEST/PROD doc scanning database connection info here without the password?

  3. arlentees commented on Nov 22, 2024

    @arlentees
    Author

    We should test this size estimate and time frame with Dave Roberts to know when we can deliver this story.

  4. doug-lovett commented on Nov 26, 2024

    @doug-lovett
    Collaborator

    Email sent to David Roberts:
    There is an Oracle document scanning database that we would like to migrate to PostgreSQL as part of standing up a new documents service. My understanding is that an office desktop application creates and updates records in this database, and one or more web applications (SOFI) reads from/updates this database.

    I have no connection information: Thor thinks it is in CPRD, and he suggested loading the data in the warehouse in a PostgreSQL database. He said there are existing scripts for migrating to the warehouse from Oracle to PostgreSQL. You and/or Andriy have been suggested to help with this migration work: is it something you could do all or part of? Also, is there a DDL script or a data model diagram for this Oracle database that you could pass along?

  5. doug-lovett commented on Nov 26, 2024

    @doug-lovett
    Collaborator

    Email Response from David Roberts:
    The COLIN/SoFi images are stored in the GLOBALP database in the CORRESPONDENCE schema in client_document.document_blob. I have attached the data dictionary for CPRD.colin_mgr_prd and GLOBALP.correspondence.

    Sorry, I did not have any involvement with migrating data to the warehouse database.

    Dictionary output attached - it looks like the GLOBALP database correspondence schema is what we want to migrate.
    data_dictionary_correspondence.txt

    data_dictionary_colin_mgr_prd.txt

  6. rarmitag commented on Nov 27, 2024

    @rarmitag
    Contributor

    key="UserName" value="readonly"
    key="Password" value=""
    //TEST
    key="Host" value="nettle.bcgov"
    //PROD
    key="Host" value="pimento.bcgov"
    key="Port" value="1521"
    //TEST
    key="Sid" value="GLOBALT"
    //PROD
    key="Sid" value="GLOBALP"

    These are found in my App.config from the application. The App.config for the working copy may be different fro the dev one.

  7. arlentees commented on Nov 27, 2024

    @arlentees
    Author

    Still need to talk to Andrei or Thor regarding the DB

  8. rarmitag commented on Nov 27, 2024

    @rarmitag
    Contributor

    username defined in code: "CORRESPONDENCE"

  9. doug-lovett commented on Nov 27, 2024

    @doug-lovett
    Collaborator

    Sent a follow up email to David Roberts to see if he could provide csv extract files from the GLOBALP.correspondence tables. It turns out I can access the prod database with read only access and VPN.

  10. self-assigned this
    on Nov 28, 2024
  11. arlentees commented on Dec 5, 2024

    @arlentees
    Author

    Note that the migration effort looks like we can move roughly 800 documents per hour, once all the records have been migration

  12. chdivyareddy commented on Dec 16, 2024

    @chdivyareddy
    Collaborator

    Hey @doug-lovett , the comparison with SOFI looks as expected, but in TEST I'm unable to open the pdf document from the dashboard (the extension has .html instead of pdf), and can be only downloadable from the document record screen. Please take a look, thanks!

    image.png

  13. doug-lovett commented on Dec 16, 2024

    @doug-lovett
    Collaborator

    In TEST querying the database on consumer identifier 054738 there are 3 DRS records with documents. The document storage references are:
    2009/11/12/PUBA-52121.pdf
    2009/07/29/DEAT-51231.pdf
    2018/08/23/WILL-762049.pdf

    The 3 documents fetched directly from storage are attached.
    2018_08_23_WILL-762049.pdf
    2009_11_12_PUBA-52121.pdf
    2009_07_29_DEAT-51231.pdf

    Here is the API response to get the corresponding document record information with the download links:
    [
    {
    "author": "",
    "consumerDocumentId": "50606003",
    "consumerFilename": "MH0054738_2009-11-12_15:06:59",
    "consumerIdentifier": "054738",
    "createDateTime": "2009-11-12T23:11:12+00:00",
    "description": "PUBLIC AMENDMENT",
    "documentClass": "MHR",
    "documentServiceId": "DS0000108336",
    "documentType": "PUBA",
    "documentTypeDescription": "PUBLIC AMENDMENT",
    "documentURL": "https://storage.googleapis.com/docs_mhr_test/2009/11/12/PUBA-52121.pdf?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=doc-test-sa%40c4hnrd-test.iam.gserviceaccount.com%2F20241216%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20241216T233420Z&X-Goog-Expires=172800&X-Goog-SignedHeaders=host&X-Goog-Signature=2234d5399711d8e73e889032d2999fea4da372939be64f2fbb8e42cf23bcfabd4d8f1e26ab01b8228c272ee45e4a15ca8d23a5723844de013827ee03875d9eaee6be084fbbb8f288663934fe5db471823a7b91db514132c97777e4658583238c6a393a4dd46fdf97c64d2f7e48f68271f28d49b89347be6b07c68d86bf476d40781a9f7d99f61d0a856691e50d010f6b68d4e1acec4b62ac54e7615db185341a541d27894098aad1f71b0df0fd24acdd7ae178a97a375314b1e3172040a4ffd30026c35e3a8518774f0956da46456ae8f8e25771344c812ec7b8bafd2ea4bbd305c3e06b46e8ad70f040a9d0ed05d3aadab27cf40e76f8e622c45f519aef91d2"
    },
    {
    "author": "",
    "consumerDocumentId": "50845932",
    "consumerFilename": "MH0054738_2009-07-29_14:17:01",
    "consumerIdentifier": "054738",
    "createDateTime": "2009-07-29T21:07:29+00:00",
    "description": "DEATH CERTIFICATE",
    "documentClass": "MHR",
    "documentServiceId": "DS0000154588",
    "documentType": "DEAT",
    "documentTypeDescription": "TRANSFER TO SURVIVING JOINT TENANT(S)",
    "documentURL": "https://storage.googleapis.com/docs_mhr_test/2009/07/29/DEAT-51231.pdf?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=doc-test-sa%40c4hnrd-test.iam.gserviceaccount.com%2F20241216%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20241216T233420Z&X-Goog-Expires=172800&X-Goog-SignedHeaders=host&X-Goog-Signature=ab8502ecd2bc161a344c3968d22405af00a20cc28323dd375e9e89199090dd69528b9b1d00206e29d8e7f8ecdc9331e387fb09ab9ffbdde90b0db92a0723bfa097ced036080f7202b663f4d211085de997ef345008646f34a3769b12194850b79a5ad59d6f3dac374685ef7fb1e7372d3c5120fc906559fba9174d44ca942f6baf8d4e5433eaec048587ae4f8b8a0031f9c1f4a8dd90d8d82d2d8f6d1143816d7b8142b81c8e93832c84c8f9915dabe98e26020b8ea743e0666ecde02e32ffcd7da9c1167d1936c86735662da2ca37d34a1b0dc09917919860fcf2a1c8b88125a1c0e07a8d7ce3544a30c8f1f95b7d26fd0786f32d4e3b5be9063b336dee3eb2"
    },
    {
    "author": "",
    "consumerDocumentId": "62306564",
    "consumerFilename": "MH00547382018_11_13_03_55_03",
    "consumerIdentifier": "054738",
    "createDateTime": "2018-08-23T16:08:23+00:00",
    "description": "WILL/PROBATE",
    "documentClass": "MHR",
    "documentServiceId": "DS0000173530",
    "documentType": "WILL",
    "documentTypeDescription": "TRANSFER TO EXECUTOR - GRANT OF PROBATE WITH WILL",
    "documentURL": "https://storage.googleapis.com/docs_mhr_test/2018/08/23/WILL-762049.pdf?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=doc-test-sa%40c4hnrd-test.iam.gserviceaccount.com%2F20241216%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20241216T233421Z&X-Goog-Expires=172800&X-Goog-SignedHeaders=host&X-Goog-Signature=57b39aa7008b8f86a17c9d6f5b1f2f0314d2fd631fb581f90d5392cdf1dabe02f36a6692adb76b8cd296a09a0a1560c31ca8e05c4b633f6d0f661a168b47fea38a8df0277a693b2f902ab715d787a6a6d77cf10cf56eb5c3239267dc48863fbee7642a2b611f0621738bff8c674b50a527ffc72185f4fa06a604088f5d56e2e25da1267929a52032c95e77b0b0b47e6ada9878f99fad7374cd58a07d330b00ac513400aabc60a82fdfcb0f8fe8da380d1b8b173856d5ead31096b9034df6181faa6be81e231552f5b2110262b5aa9ed6fdc0a1d0f2825ccf9a56d236b5c1690a86f62ecc9b50cad6497c96dab6781b053ab968d52bc4a9facfedbd6a9fd1cfcc"
    }
    ]

    @chdivyareddy when I click on the above links in Chrome I download a PDF as expected. Your html issue is either browser related or UI related. No API change is required.

  14. chdivyareddy commented on Dec 17, 2024

    @chdivyareddy
    Collaborator

    @doug-lovett Great, thanks for the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions