Time-series precision and delivery

Copy Markdown View Source

Use this page to choose timestamp units and handle uncertain writes with Arcadic.TimeSeries. See Compatibility for the server floor and the Time-series tutorial for a complete write and query.

CallTime unit
Arcadic.TimeSeries.create_type/4DDL precision is :second, :millisecond, :microsecond, or :nanosecond.
Arcadic.TimeSeries.write/3 and write_lines/3Wire precision is :s, :ms, :us, or :ns.
Arcadic.TimeSeries.query/3:from and :to use epoch milliseconds or a DateTime.
Arcadic.TimeSeries.prom_query/3 and prom_query_range/6PromQL times and range steps use seconds.

When an instant PromQL query must include a freshly written sample, choose an evaluation time after the sample. For a millisecond timestamp ts, use div(ts, 1000) + 1. latest/3 accepts one :tag pair. A tag value may contain colons.

Writes append points. Check the relevant time window before replaying a batch with an uncertain result. A mixed-type write can return HTTP 204 and drop lines for unknown types. Raw write_lines/3 may also silently drop malformed lines. write/3 validates integer fields and timestamps against the signed 64-bit range before sending.

The qualified server rejects unknown fields on writes and unknown tag keys on reads. Older servers can insert zero-filled rows or ignore unknown tag keys. See Compatibility for the version boundary. Read full rows if you depend on column-to-value alignment. Server versions with the projection defect can return an aligned header with misaligned values when using :fields.

The time-series wire API uses HTTP. DDL and continuous aggregates use Arcadic.command/4 with SQL.