Skip to content

Server-side downsampling and SQL charting functions #129

Description

@bluestreak01

Summary

Add server-side time-series downsampling and compact SQL charting functions so dashboards can reduce and visualize large datasets without moving every raw row to the client.

The SUBSAMPLE SQL clause supports multiple shape-preserving strategies:

  • LTTB (Largest Triangle Three Buckets)
  • M4
  • MinMax
  • Uniform
  • Cadence
  • Swinging Door Trending (SDT)
SELECT ts, temperature
FROM telemetry
SUBSAMPLE LTTB(1_000);

Charting functions render compact market-data visualizations directly in SQL results:

  • ohlc_bar() / ohlc_bar_labels() for OHLC candlesticks
  • depth_chart() / depth_chart_labels() for bid/ask market depth

Motivation

High-frequency time-series often contain far more points than a chart can display. Sending all rows to a browser wastes query, network, and client resources, while simplistic sampling can hide peaks and important shape changes.

Server-side downsampling returns a bounded, representative dataset suitable for dashboards and exploratory analysis. The SQL charting functions complement it by making OHLC and order-book structure immediately visible in the Web Console and text-based query results.

Use cases include:

  • fleet and sensor dashboards over dense telemetry
  • long-range visualization of high-frequency signals
  • OHLC inspection and market-data analysis
  • order-book depth visualization
  • lower-latency dashboards with reduced result sizes

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions