Skip to main content

combine

The combine operation merges sequences back together after prior splitting via match split, preserving the original order. If there are several prior match split operations, only subsequences created during the last split will be merged, and repeated combine statements will continue to merge prior splits in reverse order. combine automatically preserves sequence dimensions that have the same values across all subsequences. Other sequence dimensions are only passed if explicitly specified how to aggregate them across sub-sequences.

combine removes all previously labeled tags.

Syntax

combine
{<merged sequence dimension name 1> =
<expression aggregating sequence dimensions across split sequences>,
<merged sequence dimension name 2> =
<expression aggregating sequence dimensions across split sequences>,
...}

Examples

Compute number of occurrences of a specific event
match split event
combine count_event = max(split_index)
Rename specific events
match split Event(event1)
set Event.name = 'new_name'
combine
Keep first occurrence of each event
match split Events()
if Events.name not in PREFIX.name
replace SEQ with Events
combine
Keep last occurrence of each event
match split Events()
if Events.name not in SUFFIX.name
replace SEQ with Events
combine
Keep last instance of a consecutive repeated event
match split A(event){2,}
replace A with A[-1]
combine
Remove specific events
match split EventsToRemove(event1 | event2)
replace EventsToRemove with null
combine