Tags & Data Sources

Dashboards don't connect directly to databases or APIs. Instead, they bind to tags. Tags are the universal data layer that sits between your data sources and your dashboards.

What Are Tags?

A tag is a named value that updates in real time. Examples:

default/temperature        → 72.5
default/pump/speed         → 1450
default/alarms/high_temp   → true

Tag paths use / as the separator between folders and the tag name. Tag names themselves can contain any characters except /.

Every chart, gauge, text block, or color binding in your dashboard reads from tags. When a tag value changes, every dashboard bound to it updates instantly.

Connecting Data Sources

Tags can pull data from multiple source types:

SourceDescription
ManualSet values directly — good for setpoints, constants, and testing
SQLPoll a PostgreSQL, MySQL, or other SQL database on an interval
HTTPPoll a REST API endpoint and extract values from the JSON response
InfluxDBQuery InfluxDB v2 with Flux
PrometheusQuery Prometheus with PromQL
TableRun a SQL, Flux, or PromQL query against a connected datasource and surface the result as a table — for data table components and multi-row bindings
SimulationGenerate synthetic data for demos and testing
ComputedCalculate values from other tags using JavaScript

No matter what the source is, your dashboard binds to the tag the same way. If you swap a simulated source for a real database later, the dashboard doesn't need to change.

Table Tags

A Table tag is backed by a live query against one of your connected datasources and produces a table of rows as its value. Pick the datasource, write the query in the built-in editor, preview the result, and save — the tag's value updates as the query returns new results.

Table tags are useful when you need:

  • A tag whose value is a table of rows (for data table components)
  • A derived result that requires a real query (joins, filters, aggregations) rather than a simple point read
  • A tag backed by a SQL datasource, InfluxDB Flux expression, or PromQL expression with minimal setup

The query editor

The tag form has a built-in query editor with:

  • Syntax highlighting for SQL, Flux, and PromQL
  • Schema-aware autocomplete — for SQL datasources, the editor completes table and column names discovered from the connected database
  • Theme-aware — matches the app's light/dark theme
  • Result preview — run your query inside the modal and see the result (including multi-row tables) before saving

The same editor is used wherever you write datasource queries in Control Seat — tag sources, chart data queries, and data table bindings — so the experience is consistent everywhere.

Binding to data tables

Data table components on your dashboard can bind directly to a table tag. Drop a data table, pick a table tag, and the table renders the live query result with sorting and pagination. Only table tags are selectable for data-table bindings — scalar tags won't appear in the dropdown, so you can't accidentally wire a table to a single value.

Live Data Flow

Data source (database, API, device, etc.)
  → Tag system
  → WebSocket stream
  → Your dashboard updates in real time

The editor preview and the published dashboard both use the same live data stream, so what you see while building is what your users see in production.

Historian

Control Seat automatically records tag history to ClickHouse. You can query historical data for:

  • Raw points — every recorded value in a time range
  • Last values — the most recent value for a set of tags
  • Aggregates — averages, min, max, and count over time buckets

Historian data powers time-series charts and historical replay features.

Example Tag

{
  "path": "process/pump/speed",
  "type": "float64",
  "writable": true,
  "source_kind": "sql"
}

Why Tags?

  • One naming model — dashboards use tag paths regardless of the underlying source
  • Portable bindings — swap data sources without changing dashboards
  • Controlled writes — write operations go through a managed path, not raw device APIs
  • Shared address space — live values, historian, simulation, and computed values all use the same tag paths