set
The set
operation creates or updates event and sequence dimensions.
Syntax
set
<sequence dimension name> =
<expression using tags and sequence dimensions>,
<tag name>{<tag slice>}.<event dimension name> =
<expression using tags and sequence dimensions>,
...
<tag slice> = [{<start index>}:{<end index>}]
Examples
Compute duration between events
match event1 >> * >> event2
set duration_1_to_2 = duration(event1, event2)
Rename events to use another dimension
set SEQ.name = SEQ.another_dimension
Create more granular event types by appending a dimension value to the event name
set SEQ.name = concat(SEQ.name, '_', SEQ.another_dim)
Rename events to use a combination of two dimensions
set SEQ.name = concat(SEQ.first_dimension, '_', SEQ.second_dimension)
Pass event dimension from one event to another
match event1 >> * >> event2
set event2.dimension = event1.dimension
Compute sum of dimension values across a sequence
set sum_dimension = sum(SEQ.dimension)
Measure length of a tag
set count = length(Tag1)
Compute duration since previous event
set SEQ[1:].time_since_last_event = SEQ[1:].ts - SEQ[-1].ts
Compute duration to next event
set SEQ[:-1].time_to_next_event = SEQ[1:].ts - SEQ[:-1].ts
Rename specific events
match split Event(event1)
set Event.name = 'new_name'
combine