Skip to main content

Mapping properties

Mappings#

Models have mappings that let the system understand the data in a better way. It's basically a list of string to dimension pair as follows:

mappings:
event_timestamp: occurred_at # dimension name
user_id: anonymous_id

event_timestamp:#

If the dataset represents time-series data, you can set the value that points to a dimension with the timestamp type, the implications are:

  • Aggregates will create incremental dbt model instead of table models to process the data incrementally.
  • The downstream tools that support time-series data will be synchronized to utilize the timestamp dimension.
    • For example, Data Studio and Superset has an optional timestamp column that lets you drilldown different granularies and Metriql maps the event_timestamp to their native timeseries mapping.

user_id:#

If your dataset represents user data such as a customer event type (ex: pageview or transaction), you can set the user_id the unlock product analytics features. The implications are:

  • You will be able to use Funnel and Retention report types.
  • The downstream tools that support user data will be synchronized.