Skip to main content

Overview

Motif uses a tiny but mighty domain-specific language, Sequence Operations Language (SOL), which makes working with sequences natural. It is easy to learn and fun to use. And you'll be pleasantly surprised by how complex questions can be expressed as short and fast SOL queries.

The most important concepts in SOL are matching and replacing. They allow you to label complex event patterns and transform data. They are similar to regular expressions, but work on sequences of events instead of strings of characters and have a user-friendly syntax.

SOL is also inspired by SQL, dplyr, Cypher, and Python.

Sequence computation model

The key approach to working with data in SOL is first to label important sub-sequences of events as tags, which are labels over one or more consecutive events in a sequence, and then to perform data transformations and computations on tagged events and their dimensions.

tip

SOL allows you to operate within a single sequence, but cannot perform aggregations across sequences. Use Motif's visualization suite to compute aggregate quantities.

SOL operates on each sequence independently and in parallel, so it is used to transform individual sequences and data cannot be passed or referenced from sequence to sequence within SOL. Once the desired metrics are defined for individual sequences, they can be aggregated post-SOL using the various visualization surfaces available in the Motif app.

Tutorial video

Here is a quick SOL introduction video: