You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tombstone Pipeline - Update Active Officers #30242
Compare database values between the GCP DEV business database and the PROD colin database for one of the above corp numbers. Active officer data is stored in the business party_roles, parties, and addresses data. Active means currently active - has not been removed. The corresponding colin tables are corp_party, offices_held, and address table where the corp_party.end_event_id is null.
Wait for the GCP DEV update to the corp summary report to include officers and compare the GCP DEV report with PROD colin summary report for one of the above corp numbers.
Compare the active officer data between the two databases:
GCP DEV (database) → check the tables:
party_roles
parties
addresses
PROD (colin database) → check the tables:
corp_party
offices_held
address
For the comparison, only include active officers:
In business DB: “active” means the officer record is currently active (not removed).
In colin DB: “active” means records where corp_party.end_event_id IS NULL.
Querying COLIN DB
SELECT
cp.corp_num,
cp.first_name,
cp.middle_name,
cp.last_name,
cp.business_name,
oh.officer_typ_cd,
cp.email_address,
cp.phone,
a.addr_line_1,
a.addr_line_2,
a.city,
a.province,
a.postal_cd,
a.country_typ_cd
FROM corp_party cp
JOIN offices_held oh ON cp.corp_party_id = oh.corp_party_id
LEFT JOIN address a
ON cp.mailing_addr_id = a.addr_id
OR cp.delivery_addr_id = a.addr_id
WHERE cp.corp_num = 'BC1249698'
AND cp.end_event_id IS NULL;
Now GCP DEV
-- Active officers for one corp in the GCP DEV "business" database
SELECT
b.identifier AS corp_num, -- e.g., 'BC0934777'
pr.role AS officer_typ_cd, -- officer role
p.first_name,
p.middle_initial AS middle_name,
p.last_name,
p.organization_name AS business_name,
p.email,
-- Mailing address (from parties.mailing_address_id)
ma.street AS mailing_street,
ma.street_additional AS mailing_street_additional,
ma.city AS mailing_city,
ma.region AS mailing_region,
ma.postal_code AS mailing_postal_code,
ma.country AS mailing_country,
-- Delivery address (from parties.delivery_address_id)
da.street AS delivery_street,
da.street_additional AS delivery_street_additional,
da.city AS delivery_city,
da.region AS delivery_region,
da.postal_code AS delivery_postal_code,
da.country AS delivery_country
FROM party_roles pr
JOIN parties p ON pr.party_id = p.id
JOIN businesses b ON pr.business_id = b.id -- holds the corp identifier
LEFT JOIN addresses ma ON p.mailing_address_id = ma.id
LEFT JOIN addresses da ON p.delivery_address_id = da.id
WHERE b.identifier = 'BC1249698' -- or 'BC0934782'
AND pr.cessation_date IS NULL; -- ACTIVE in business DB
Activity
vishnup0422 commentedon Aug 19, 2025
Hello @doug-lovett,
Can you please provide the Testing Instructions (Steps , Env details or other details related to verifications )
Thanks
doug-lovett commentedon Aug 19, 2025
Hello @vishnup0422
There are 2 options here:
vishnup0422 commentedon Aug 20, 2025
QA Validations : Comparing Colin DB and GCP DEV
Compare the active officer data between the two databases:
GCP DEV (database) → check the tables:
party_roles
parties
addresses
PROD (colin database) → check the tables:
corp_party
offices_held
address
For the comparison, only include active officers:
In business DB: “active” means the officer record is currently active (not removed).
In colin DB: “active” means records where corp_party.end_event_id IS NULL.
Querying COLIN DB
Now GCP DEV