How would you structure an event schema for funnel and cohort analysis?
This tests analytical event modeling. Use an immutable log with one row per event; attach context user_id, session_id, campaign; use a wide atomic table plus extensible contexts for funnel and cohort queries without joins.
What's really being asked
This question evaluates your ability to design a data model optimized for analytical workloads rather than transactional processing. The interviewer cares that you understand event-driven architecture, the tradeoffs between normalization and denormalization, and how to minimize downstream transformation work for growth analysts. Specifically they want to see if you know how to preserve immutable history, attach rich context at collection time, and structure data so funnel, segmentation, and retention queries are single-pass operations.
The full answer
First, propose an immutable, append-only event log where each row represents exactly one event, following the Snowplow canonical model pattern. Second, advocate for a fat atomic table that stores common dimensions like user_id, anonymous_id, session_id, timestamps, device, OS, and campaign parameters in dedicated columns so analysts can filter and group without parsing JSON or joining lookup tables. Third, describe an extensible schema mechanism where custom unstructured events and custom contexts live in dedicated tables but remain joinable on a unique event_id, allowing product-specific instrumentation to evolve without breaking existing queries. Fourth, emphasize timestamp hygiene by distinguishing between collector timestamp, device timestamp, and derived timestamp so latency and clock skew do not corrupt funnel ordering. Fifth, mention identity stitching by capturing both anonymous and authenticated identifiers on every event, enabling accurate cohort retention and cross-device segmentation.
The mistakes people make
A normalized OLTP schema with separate tables for users, sessions, and events forces analysts to write complex joins and reconstruct state, which is exactly the anti-pattern the question warns against. Mutable state tables that update user attributes in place destroy historical context and make it impossible to answer what a user looked like at the time of the event. Storing only pre-aggregated counts removes the raw event granularity needed for ad-hoc funnel analysis. Proposing purely schemaless JSON blobs without indexed columns makes segmentation queries slow and expensive.
What usually comes next
The interviewer may ask how you would handle schema evolution without breaking downstream dashboards, how to enforce GDPR right-to-erasure in an immutable log, or what storage format you would choose for the raw layer versus the query layer. They might also probe how you would deduplicate events received multiple times, or how to model session boundaries when events arrive out of order.
A concrete example
Imagine a SaaS product onboarding flow. You instrument page_view, signup_start, and workspace_created events. Each row in the atomic events table carries collector_tstamp, user_id, anonymous_id, session_id, device_family, and utm_source. A custom context table holds trial_length_days and referrer_domain, joined by event_id. An analyst can compute a signup funnel by counting distinct session_ids where event_type equals each step in order, segment by utm_source without transformations, and measure week-one retention by checking whether users in the workspace_created cohort generated any subsequent event within seven days.
Interview question
An analyst needs to compute a signup funnel and segment users by UTM source without joining lookup tables for common dimensions. Which schema approach best enables this?
- a.Record pre-aggregated daily counts of signups and sessions by UTM source to speed up funnel queries
- b.Store events in a normalized OLTP schema with separate tables for users, sessions, and campaigns, reconstructing state via joins at query time
- c.Store all event properties as schemaless JSON blobs and parse UTM source at query time to preserve schema flexibility
- d.Use a wide atomic events table with dedicated columns for UTM source, user_id, and session_id, plus extensible context tables joined only for custom attributesCorrect
Why? this is the answer
A wide atomic table places common segmentation dimensions like UTM source directly on the event row, letting analysts filter and group without joins, whereas a normalized OLTP schema forces complex joins and state reconstruction that slow down funnel queries.
Just read this? Test yourself on what you have been reading.
Read the original → github.com
- #event tracking
- #data modeling
- #analytics schema
- #growth engineering
- #snowplow
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles