Event Tables
Session events are stored in the session table and feature events are stored in the respective feature tables. This makes it easy and efficient to query the events you are interested in the context of where they occur.
However, inherited events can be spread out among various features throughout the warehouse. In order to deal with this, Causal creates a view for inherited events that is a union of all the events that import it. You can use this view to run reports or ETLs on the parent events and be confident that if someone adds a new event that should be included, it'll automatically be added to the data.
The view contains:
- ds: (partition key) The date of the session expiry in UTC.
- hh: (partition key) The hour of the session expiry in UTC.
- device_id: A unique identifier for the user’s device. This persists between sessions on the same device. This column will not be present if your team marked a different field with @persistent_key.
- session_id: Causal's internal session identifier. See Session Keys.
- impression_id: Impression_id in which the event occured. See Feature Tables.
- featurename: The feature name of the feature that inherited the base event. If the event happens on the session, this value will be "session".
- eventname: The event name of the event that inherits the base event.
- eventtime: The timestamp (UTC) the event occured.
- All the fields of the base event are included.