-
Notifications
You must be signed in to change notification settings - Fork 81
31096 - Skip Event Not Completed For Migration #3928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| and (end_event_id is null or end_event_id >= {event_id}) | ||
| and corp_name_typ_cd in ('CO', 'NB') | ||
| order by start_event_id desc | ||
| limit 1) = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| limit 1) = null | |
| limit 1) is null |
vysakh-menon-aot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot visualize the impact of this. please test with different scenario to make sure its not missing any data
| left outer join corp_name cn_old on e.event_id = cn_old.end_event_id and cn_old.corp_name_typ_cd in ('CO', 'NB') | ||
| left outer join corp_name cn_new on e.event_id = cn_new.start_event_id and cn_new.corp_name_typ_cd in ('CO', 'NB') | ||
| left outer join corp_name cn_old on e.event_id = cn_old.end_event_id | ||
| left outer join corp_name cn_new on e.event_id = cn_new.start_event_id | ||
| left outer join cont_out co on co.start_event_id = e.event_id | ||
| where 1 = 1 | ||
| and e.corp_num = '{corp_num}' | ||
| and not (cn_old.corp_name is null AND cn_new.corp_name is not null and cn_new.corp_name_typ_cd in ('CO', 'NB')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think this works.
I just tested this code locally and I still see the conversion name change for name change type NO being migrated into the filings table.
I think the solution should be:
- Keep the left outer joins as is. i.e continue filtering on ('CO', 'NB')
- Add the where clause of
and not (e.event_type_cd = 'CONVNC' and cn_old.corp_name is null and cn_new.corp_name is null). I think this should work because the joins where name types that are not CO or NB will now be null. I haven't tested this so you'll need to see if it works.

Issue #: /bcgov/entity#31096
Description of changes:
Skip Events which are not completed
event 1 -> event2
event2 -> null [skip] (currently in name change its returning null -> null )
event 2 -> event3
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).