historian_coverage
Assess historian data availability per tag: rows, first and last timestamps, to answer root cause analysis questions. Read-only and bounded, returns tag list with coverage details.
Instructions
[READ][risk=low] Per-tag history coverage — what history do we actually have.
Answers the question every RCA starts with: which tags have stored history,
how many rows, and over what time span — per tag {rows, first_ts, last_ts}
from the same store historian_push writes. Read-only, bounded (tag list is
capped with a truncation flag); no device I/O.
Args:
reader: 'sqlite' | 'tdengine' | 'iotdb'. Omit to use the per-site
'historian:' block in ~/.iaiops/config.yaml, else the local sqlite
store. TSDB readers need their extra: pip install iaiops[tdengine|iotdb].
limit: Max tags returned (1..2000; default 500).
Returns dict: {reader, source, tag_count, tags:[{tag, rows, first_ts,
last_ts}], truncated} plus the standard return envelope
(items_returned, items_total, items_total_is_exact, is_truncated,
truncation_note).
Example: historian_coverage().
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| reader | No |