Skip to content

add InfluxDB 3.x support #984

@crandles

Description

@crandles

InfluxDB 3.x (GA April 2025, now at 3.9.1) is a ground-up rewrite -- Flux is gone, SQL is the primary query language, and there are new /api/v3/ endpoints for queries and writes. Trickster's existing InfluxQL support works against v3 via compat endpoints, but there's no caching for SQL queries or the native v3 API.

Main gaps: SQL query caching (/api/v3/query_sql), v3 InfluxQL endpoint (/api/v3/query_influxql), and new response formats (jsonl, csv). Can model the SQL time-range parsing after the clickhouse backend.

Flight SQL (gRPC)

v3 also exposes Apache Arrow Flight SQL on gRPC. Grafana's InfluxDB datasource in SQL mode uses Flight SQL, not HTTP -- so without this, SQL panels in Grafana can't go through Trickster. Other high-perf v3 clients (Python/Rust/Java SDKs) also default to Flight SQL.

To support this we need:

  • gRPC listener (extend the non-HTTP protocol listener pattern from feat: [clickhouse] native binary protocol + parser + grafana v4 plugin #981, or a new gRPC-aware listener variant -- grpc.Server.Serve(lis) owns the whole listener, unlike raw-TCP per-conn handling)
  • Flight SQL server implementation -- handle CommandStatementQuery + DoGet
  • Apache Arrow Go (github.com/apache/arrow-go/v18) for Arrow RecordBatch serialization
  • Reuse existing SQL parser + delta-proxy cache by querying upstream over HTTP SQL (/api/v3/query_sql?format=json), converting to Arrow on the way out. Upstream-via-Flight-SQL is a later optimization.
  • Cache interop: dataset.DataSet round-trips to Arrow record batches

Tracking as part of this issue since the goal is the same (cache v3 SQL). Scope may split into separate PRs.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestinfluxdbIssue affects InfluxDB

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions