Skip to content

Portable SignalQL analytics data model

Adapters map warehouse-specific schemas to this minimal logical model. Field names below are defaults; adapters may rename columns when compiling queries.

user_id and session_id links are nullable in the portable model, so event/session rows may exist without a matching parent row.

Tables

events

ColumnTypeNullSemantics
event_nametextnoCanonical event identifier
user_idtextyesStable user key when known
session_idtextyesSession bucket
timestamptimestamptznoEvent time in UTC
propertiesjsonbyesArbitrary payload; access rules below

users

ColumnTypeNullSemantics
user_idtextnoPrimary key
traitsjsonbyesProfile attributes

sessions

ColumnTypeNullSemantics
session_idtextnoPrimary key
user_idtextyesOwner
started_attimestamptznoSession start
ended_attimestamptzyesOptional explicit end

JSON property access

  • Dot paths refer to properties on events or traits on users, e.g. properties.plan = 'pro'.
  • Missing keys compare false for equality filters; adapters document JSON coercion.
  • Only literal comparisons are required in v0.1; nested objects use documented paths.

Mapping custom schemas

Adapters provide column maps and optional expression maps for derived fields. Required capabilities:

  • Resolve event_name, timestamp, and user_id (or anonymous surrogate).
  • Expose properties as JSON or map to a flat view.

Required vs optional

  • Required: events.event_name, events.timestamp; one of user linkage or anonymous handling.
  • Optional: session_id, properties, full users / sessions tables when not used.

The sample seed dataset in this repository matches this model for tests and demos.

Graph model (v0.4)

v0.4 graph queries bind two additional logical sources, resolved through the source map (entities, edges keys; defaults entities and edges):

entities

ColumnRequiredMeaning
entity_idyesStable identifier.
kindyesEntity type, e.g. decision, ticket, assumption.
propertiesnoJSON payload; bare predicate names resolve here.
updated_atfor AS OFVersion effective time (bitemporal anchor).
version / supersedednoRevision metadata.

edges (relationship store)

ColumnRequiredMeaning
from_entityyesSource entity id.
relationshipyesEdge label, e.g. derived_from, supports (vocab is external).
to_entityyesTarget entity id.
propertiesnoJSON payload; confidence is read for lineage.
observed_atfor AS OFEdge effective time.

Provenance edges — derived_from plus source/confidence — form the lineage substrate that TRACE walks. Required: entity_id, kind, and the three edge endpoint columns. updated_at/observed_at are required only when using bitemporal AS OF.