Skip to content

Exclude these businesses from reloading #27333

Closed

Description

@vysakh-menon-aot

Exclude these businesses from reloading (these businesses has all the previous filings). These businesses are completely migrated

-- Query in lear db
select b.identifier, f.*
from public.filings f
	join businesses b on b.id = f.business_id
where
	filing_type='alteration'
	and meta_data->'alteration'->>'fromLegalType' in ('BC', 'ULC', 'CC', 'C', 'CUL', 'CCC')
	and meta_data->'alteration'->>'toLegalType' in ('BEN', 'CBEN')
	and b.id not in (
		select b.id from public.filings f
			join businesses b on b.id=f.business_id
		where
			filing_type='lear_epoch'
			and b.legal_type in ('BEN','BC', 'ULC', 'CC', 'CBEN','C', 'CUL', 'CCC')
			and filing_json->'filing'->'business'->>'legalType' <> 'BEN')
	

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