Sundial Event Data Schema
Below is a recommended schema in which Sundial can integrate Event Logs. Sundial is very flexible in terms of the various data sources and schema of event tables it can integrate with. The recommended schema below is in line with how most event logging framework logs data. Given a single or a set of these Event Tables, Sundial can generate following Metrics and related Insights:
- Growth Accounting Insights
- Retention Insights
- AHA Moment Insights
- Activation Insights
Each Insights area generates several key metrics for the Analysis Area.
Add as many segmentations as possible for more deeper Insights.
Daily Event Table:
This table contains all the raw event logs related to any entity like a user, client-account.
- Each
event_type
can come from separate tables if needed.
event_date | entity_id (Ex: user-id, transaction-id, order-id) | event_type | event_metadata (optional. Include any event related values) | segment_1 (ex: Country, Platform) | segment_2 (ex: Country, Platform) | ... |
---|---|---|---|---|---|---|
2019-01-01 | hfda123 | app_open | India | iOS | ||
2019-01-02 | kdfs387 | viewed_video | 22 | USA | android | |
2020-01-02 | kdfs387 | shopping_cart_add | 2 | Canada |
Segments / Entity Attributes Table
If all segmentations are not present in the Daily Event Table, they can come from separate tables too. This table updates the attributes related to an entity daily. This table collects segmentation information from various operational sources. This table is continuously updated as single source of truth. Or is maintained as a daily snapshot of all users and their segmentations on a given day.
event_date | user_id | country | platform | ... |
---|---|---|---|---|
2019-01-01 | hfda123 | USA | Android | |
2019-01-02 | kdfs387 | UK | iOS |
Segmentations can be maintained in a single table for all entities or be part of the Event Tables described above.