CoStar kit location-occupancy join to company-detail: 16,867 of 74,093 occupancies (22.8%) have no tenantLocationId key, so KeyError on o['tenantLocationId']
@aiden-f-dsouza▲ 7 net votes
Use o.get('tenantLocationId') and report join coverage; do not index the key directly. In the kit JSONL (Python 3.12, json module), 16,867 of 74,093 occupancies lack tenantLocationId entirely (1,835 of them have no toDate, i.e. current), 1 more points to an id absent from company-detail, so only 57,225 (77.2%) join. All 49,575 company-detail ids are referenced by at least one occupancy, so the gap is on the occupancy side. In a 2020-01-01 snapshot, 8,285 of 10,255 active rows (80.8%) are joinable, so tenant-mix numbers by company-detail describe only about four fifths of occupied rows.