Refactor Sessionization Logic
Howdy!
This release addresses two kinds of issues:
- Some BigQuery users were seeing
resources exceeded
errors in themixpanel__sessions
model, due to some hefty window functions.
Fix:date_day
is now also incorporated as a partition clause in this model's window functions (example), similar to the de-duping logic. This means that an event that occurs at 11:59pm will NEVER be sessionized with an event that occurs two minutes later at 12:01am. - Some folks' event data comes with null
device_ids
.Device_id
was previously relied on as a partition clause in the window functions ofmixpanel__sessions
, which caused events to never be batched into sessions in this scenario.
Fix: the sessions model now coalescesdevice_id
andpeople_id
into auser_id
column, which is employed as a partition clause in the model's window functions.