18Sessionize a support-event stream: a gap over 30 minutes starts a new session; dedupe events▼mediumGleanScaleRetool1 replies○ sign inSessionization is the analytics primitive behind every 'how do users actually behave' question, and a favorite practical screen. The algorithm is easy; out-of-order events and duplicates are where the round is actually scored.Open full answer →
07Sessionize a raw event stream in SQL: a gap of more than 30 minutes starts a new session.▼mediumDatabricksMetaSnowflake1 repliesunlockedSessionization is gaps-and-islands with a twist, and it shows up in both SQL screens and Spark rounds at Databricks. The LAG-plus-running-SUM pattern here solves a whole family of interview questions.Open full answer →