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
Create script to update colin data before corps are migrated to modernized system #28884
As part of the onboarding process, right before a corp is migrated to the modernized system, we’ll want to update each corp as follows:
freeze the the corp
add corp entry into early adopter table
We’ll want to implement this in a way where it will be easy to just freeze the corp or only add an entry into the early adopter table. It’s envisioned that we do both at the same time but the business could potentially want us to only add the corresponding corp entries into the early adopter table after we have migrated the corps.
Had thought about possibly doing this work via tombstone pipeline but I think it makes sense as a separate flow.
Tasks
Create prefect flow to update colin data
update following in colin:
freeze corp
add corp entry into early adopter table
probably want things to be batched although if it’s too much work, we can just do something simpler first time around and cut a separate ticket to make it batched. we will need it eventually for larger data loads during onboarding and the final load at the end
the query used to pull corps to update colin data should be from the extract. we don’t have things like group or batch numbers yet but the code used to pull the corps from extract db should be flexible enough that it can support that when we are ready to include that in this flow
flow updates COLIN tracking table in extract
Create a new table in extract ddl that just tracks update of COLIN data. Maybe these fields but whoever picks it up can think about it more. Note there will be a flow to unfreeze or remove an early adopter too. Maybe that will just be a separate entry? will need to design appropriately in preparation for the other flow
corp_num
frozen (not sure…will need more thought)
early_adopter (not sure…will need more thought)
environment
create_date
Talk to Siddharth about if he has a db user he wants us to use or if he wants to create a new user for us that only has write access to the relevant tables
@vishnup0422 the testing of this requires testing colin_freeze_flow.py which updates data in the COLIN db. I advise testing against COLIN dev or test db. I believe the latest extract should contain a test migration group + batches to test updating COLIN dev data.
Ping me and we can talk more about how to test this.
Closing this as I was able to update COLIN data with the COLIN freeze flow for the latest early adopter migration (#29240). Darci from home team verified the COLIN data was updated as expected by the freeze flow.
Activity
argush3 commentedon Jun 6, 2025
Hey team! Please add your planning poker estimate with Zenhub @vysakh-menon-aot @vishnup0422 @chenhongjing
chenhongjing commentedon Jun 24, 2025
Notes for QA
@vishnup0422 Here is the setup doc. You may need to test it together with this work #28964 as more changes are fleshed out there.
@argush3 Could you please help him a bit with setting this new flow up and testing? Thanks!
vishnup0422 commentedon Jun 30, 2025
QA Validations ; on TEST ENV
Created a New Group 4, on the Prod DB Table public.mig_group

Created 2 new batches group the Group id 4 ; Batches id 9 and 10

`-- Insert into mig_batch_id = 9
INSERT INTO public.mig_corp_batch (mig_batch_id, corp_num) VALUES
(9, 'BC0000073'),
(9, 'BC0000074'),
(9, 'BC0000075'),
(9, 'BC0000076'),
(9, 'BC0000077'),
(9, 'BC0000078'),
(9, 'BC0000079'),
(9, 'BC0000080'),
(9, 'BC0000081'),
(9, 'BC0000082'),
(9, 'BC0000083'),
(9, 'BC0000084'),
(9, 'BC0000085');
-- Insert into mig_batch_id = 10
INSERT INTO public.mig_corp_batch (mig_batch_id, corp_num) VALUES
(10, 'BC0000086'),
(10, 'BC0000087'),
(10, 'BC0000088'),
(10, 'BC0000089'),
(10, 'BC0000090'),
(10, 'BC0000091'),
(10, 'BC0000092'),
(10, 'BC0000093'),
(10, 'BC0000094'),
(10, 'BC0000095'),
(10, 'BC0000096'),
(10, 'BC0000097'),
(10, 'BC0000098');
`
Now used migration filter values, to verify the different Test scenarios

After Migration ; SELECT * FROM public.corp_processing
DELETE CROPS :

argush3 commentedon Jul 2, 2025
@vishnup0422 the testing of this requires testing
colin_freeze_flow.pywhich updates data in the COLIN db. I advise testing against COLIN dev or test db. I believe the latest extract should contain a test migration group + batches to test updating COLIN dev data.Ping me and we can talk more about how to test this.
argush3 commentedon Jul 4, 2025
Closing this as I was able to update COLIN data with the COLIN freeze flow for the latest early adopter migration (#29240). Darci from home team verified the COLIN data was updated as expected by the freeze flow.