DRAFTThis page is not published. Only visible in development mode.

Series

A series stores rows ordered by a required key column - a timestamp or an integer. It is the shape for measurements, audit trails, and historical records: data that arrives in order, is queried by range, and grows without an upper bound.

The key defines the order

Every series declares its ordering column with with { key: column }. The key can be an integer - useful for sequence numbers, block heights, or logical clocks. Reads return the newest entries first. Run the snippets on this page in order:

$ A Series Ordered by an Integer Key
$ ctrl+enter to run

Time-keyed series and precision

With a datetime key, the series stores timestamps at a declared precision: second, millisecond (the default), microsecond, or nanosecond:

$ A Series Keyed by Time
$ ctrl+enter to run

If a write omits the key, the engine assigns the current time - so an append-only event log needs nothing beyond the payload:

$ Omit the Key and the Engine Timestamps the Row
$ ctrl+enter to run

Range queries follow the key

Filters on the key column select by the series' native order, which is what time-window and "since X" queries compile to:

$ Key Filters Use the Series Order
$ ctrl+enter to run

History can be corrected

A series is ordered, not immutable. Late corrections - a recalibrated sensor, an amended audit record - are ordinary updates selected by key:

$ Correct a Recorded Value
$ ctrl+enter to run

Classifying entries with tags

A series can attach a tag type - a named set of variants, optionally with payload fields - to classify where each entry came from or what kind it is, without widening the schema:

$ Attach a Tag Type for Classification
$ ctrl+enter to run

Series or something else?

  • --Current state keyed by identity (one row per user, per order): a table.
  • --Only the last N entries matter: a ring buffer.
  • --Derived history - the output of a pipeline recorded over time: a series-backed view.
Bounding growth
A series grows without limit by design. To expire old entries, attach a TTL - see TTL & Row Settings.