Introducing SOL: Sequence Operations Language
<p>Shortly after we started <a href="https://motifanalytics.com/" rel="noopener ugc nofollow" target="_blank">Motif</a> last year, my co-founder Misha asked me to think about what core set of sequence operations we should support. Thus began our quest for a small, yet expressive set of operations that allowed our users to do almost anything they could imagine with their event sequence data. We’ve made a lot of progress since then, culminating in a carefully crafted domain-specific language we call <em>SOL: Sequence Operations Language</em>. I’m excited to share more about how we designed SOL — it will help you understand how Motif is attacking the problem of making it joyful and exciting to work with event sequence data we collect from our product instrumentation.</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:568/1*xW9cs6J_ocnD6MRl5y6d9Q.png" style="height:458px; width:568px" /></p>
<p>SOL is pronounced “Soul,” as in the title of this 1981 book by Tracy Kidder.</p>
<p>Before we begin, it’s worth clarifying what we mean by an <em>event sequence</em>. An <em>event</em> is a structured record of some specific thing that occurred, often created and recorded by a logging framework (e.g. a JSON object or Python dictionary). An event must have a timestamp associated with it, the moment it was observed or recorded. Events must also have a unique identifier, like the user associated with the event. Sorting events in order by timestamp, partitioned by these unique identifiers, we end up with a <em>set</em> of event sequences, each capturing everything that’s been observed about one particular user over time.</p>
<p><strong>Click Here</strong></p>