Reveloo

Event Models

The below is an example of an event model called activities. Event models capture point-in-time events that happen to one or many dimensions. Each event model must have a dt column specifying the time at which the event took place, and an event column specifying the event name. Other columns (including related dimensions) can be defined in the YAML.


A SQL query defines the data that will be exposed in Reveloo:

/events/activities/events.sql

SELECT
  created_dt AS dt,
  event_name AS event,
  customer_id,
  browser
FROM source_events


A YAML file annotates the model, giving the data meaning:

/events/activities/events.yaml

  name: Web Activities
  icon: mdi-laptop

  columns:

    - id: dt
      name: Time (UTC)
      type: datetime

    - id: event
      name: Event
      type: string

    - id: customer_id
      name: Customer
      type: key
      model: customers

    - id: browser
      name: Browser
      type: string


A table is generated in the rloo. schema, with data exposed to the web portal:

Redshift table rloo.activites

justin@warehouse=> select * from rloo.activities;

            dt          | event |  customer_id  | browser
------------------------+-------+---------------+----------
2019-06-17 00:00:06.747 | CLICK | 87fc4b0e-c0df | safari
2019-06-17 00:00:05.115 | OPEN  | 87fc4b0e-c0df | safari
2019-06-17 00:00:05.011 | OPEN  | 64bfffca-a6aa | chrome
© Reveloo 2020
FAQ · Docs · Terms