Events Metadata

Metadata table providing distinct event names, types, and sources from nexus_events

The nexus_events_metadata table provides a catalog of all distinct event configurations present in the nexus_events table. This metadata table is useful for understanding what events are available in your data and how they're structured across different sources.

Overview

This metadata table aggregates distinct combinations of event attributes, making it easy to:

  • Discover available events across all sources
  • Understand event naming conventions
  • Identify event types and their associated sources

Schema

Field Type Description
event_name String The specific event name
event_type String The event category or type
source String The source system for the event

Query Examples

Discover All Available Events

select
    event_name,
    event_type,
    source
from {{ ref('nexus_events_metadata') }}
order by source, event_type, event_name

Find Events by Type

select
    event_name,
    source
from {{ ref('nexus_events_metadata') }}
where event_type = 'appointment'
order by source, event_name

Count Events by Source

select
    source,
    count(distinct event_name) as unique_events,
    count(distinct event_type) as unique_types
from {{ ref('nexus_events_metadata') }}
group by source
order by unique_events desc

Usage

This metadata table is automatically maintained by the nexus_events_metadata model, which selects distinct combinations from nexus_events. The table is materialized as a table for fast querying.