Skip to content

Tombstone data: Review CARSBOX table data #29735

Closed

Description

@argush3

Ref analysis: https://bcgov.sharepoint.com/:w:/r/teams/07717/_layouts/15/doc2.aspx?sourcedoc=%7B36EE3250-2960-4F8F-AE4A-5F749BE2A61B%7D&file=CARS%20DB%20Tables%20Analysis.docx&action=default&mobileredirect=true

  • Include carsfile, carsbox, carindiv tables in colin extract (dll, transfer query)
  • Create a new extract of colin db and upload to GCP cloud storage
  • Include cars data in tombstone migratation. Add these into filing metadata

Activity

  1. added
    Entities - Data Migration
    on Jul 23, 2025
  2. vikas-gov commented on Jul 31, 2025

    @vikas-gov
    Collaborator

    Targeting to have feedback from DL by end of next week Aug 8

  3. dylan644 commented on Aug 18, 2025

    @dylan644

    @vysakh-menon-aot write up of the CARS tables analysis is in the files area of the Data Migration teams channel now

  4. vysakh-menon-aot commented on Aug 27, 2025

    @vysakh-menon-aot
    Contributor

    Test Note:

    @vishnup0422
    Find any corporation with cars data and migrate. Check for these fields in filing meta_data column under conversion object

    • accessionNumber
    • batchNumber
    • effectiveDate (filedate in COLIN DB)
    • filedBy (regiracf in COLIN DB)
    • boxFiledBy (boxrracf in COLIN DB)

    Refer the analysis report for more details.

  5. vishnup0422 commented on Sep 2, 2025

    @vishnup0422
    Collaborator

    QA Validations :

    Query to fetch the business for this migration Testing is

     select
       e.corp_num,
            e.event_id,
            cl.cars_docmnt_id,
            cf.filedate,
            cf.regiracf,
            cb.accesnum,
            cb.batchnum,
            cb.boxrracf
        from event e
            join conv_ledger cl on e.event_id = cl.event_id
            left outer join carsfile cf on cf.documtid = cl.cars_docmnt_id 
            left outer join carsbox cb on cb.documtid = cl.cars_docmnt_id 
            --join corporation c on e.corp_num = c.corp_num and c.corp_num = '{corp_num}'
        where
            cl.cars_docmnt_id is not null
    

    image.png

  6. vishnup0422 commented on Sep 2, 2025

    @vishnup0422
    Collaborator

    Migration to Test env : ( migrated 3 Crops for testing)

    2:11:55.914 | INFO | Task run '3-Corp-Tombstone-Migrate-Task-Async-dfe' - 👷 Start migrating BC0112322...
    12:11:55.932 | INFO | Task run '3-Corp-Tombstone-Migrate-Task-Async-d57' - 👷 Start migrating BC0007712...
    12:11:55.938 | INFO | Task run '3-Corp-Tombstone-Migrate-Task-Async-74c' - 👷 Start migrating BC0004022...

  7. vishnup0422 commented on Sep 2, 2025

    @vishnup0422
    Collaborator

    image.png

  8. vishnup0422 commented on Sep 2, 2025

    @vishnup0422
    Collaborator

    In Test DB

    SELECT
      b.identifier AS corp_num,
      f.id         AS filing_id,
      -- fields under meta_data.conversion
      f.meta_data->'conversion'->>'accessionNumber' AS accession_number,
      f.meta_data->'conversion'->>'batchNumber'     AS batch_number,
      f.meta_data->'conversion'->>'effectiveDate'   AS effective_date,
      f.meta_data->'conversion'->>'filedBy'         AS filed_by,
      f.meta_data->'conversion'->>'boxFiledBy'      AS box_filed_by
    FROM filings f
    JOIN businesses b ON b.id = f.business_id
    WHERE b.identifier IN ('BC0004022','BC0007712','BC0112322')
      AND f.meta_data->'conversion' IS NOT NULL
    ORDER BY b.identifier, f.id DESC;
    

    image.png

  9. vishnup0422 commented on Sep 2, 2025

    @vishnup0422
    Collaborator

    Migration of the AccessionNumber was not happening and Vysakh noticed a small code issue (spelling mistake)

    moving back the ticket

  10. vishnup0422 commented on Sep 2, 2025

    @vishnup0422
    Collaborator

    QA Validations :

    Query to fetch the business for this migration Testing is

     select
       e.corp_num,
            e.event_id,
            cl.cars_docmnt_id,
            cf.filedate,
            cf.regiracf,
            cb.accesnum,
            cb.batchnum,
            cb.boxrracf
        from event e
            join conv_ledger cl on e.event_id = cl.event_id
            left outer join carsfile cf on cf.documtid = cl.cars_docmnt_id 
            left outer join carsbox cb on cb.documtid = cl.cars_docmnt_id 
            --join corporation c on e.corp_num = c.corp_num and c.corp_num = '{corp_num}'
        where
            cl.cars_docmnt_id is not null
    

    image.png

    Migrated Buisness
    'BC0004022','BC0007712','BC0112322'

    image.png

    image.png

    image.png

  11. vishnup0422 commented on Sep 2, 2025

    @vishnup0422
    Collaborator

    image.png

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

Metadata

Metadata

Labels

Entities - Data Migration

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions