Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

api.metrics_explore_view

Description

Expands all SignalK keys from the vessel’s latest metric row.
Used to discover available paths for custom configuration mapping.

Table Definition
CREATE VIEW metrics_explore_view AS (
 WITH raw_metrics AS (
         SELECT metrics."time",
            metrics.metrics
           FROM api.metrics
          WHERE (metrics.vessel_id = current_setting('vessel.id'::text, true))
          ORDER BY metrics."time" DESC
         LIMIT 1
        )
 SELECT raw_metrics."time",
    kv.key,
    kv.value
   FROM raw_metrics,
    LATERAL jsonb_each_text(raw_metrics.metrics) kv(key, value)
  ORDER BY kv.key
)

Columns

NameTypeDefaultNullable
keytexttrue
timetimestamp with time zonetrue
valuetexttrue

Referenced Tables

NameColumnsCommentType
api.metrics11Stores time-series metrics from vessel via SignalK plugin.
TimescaleDB hypertable partitioned by time.
BASE TABLE

Relations

erDiagram


"api.metrics_explore_view" {
  text key ""
  timestamp_with_time_zone time ""
  text value ""
}

Generated by tbls