influxdb-client-ruby icon indicating copy to clipboard operation
influxdb-client-ruby copied to clipboard

Support for InfluxQL queries

Open SMillerDev opened this issue 2 years ago • 2 comments

Proposal: Since InfluxCloud Serverless prefers InfluxQL again it would be good if we can use this library to query it.

Current behavior: Currently non-flux queries throw errors.

Desired behavior: Non-flux queries should work

Alternatives considered: Just giving up on InfluxDB altogether since the requirements change so much between versions that even internal libraries can keep up.

Use case: Nobody using the latest InfluxDB version can use this library, including people who were forced to a newer version because their old data got deleted with the rest of the region.

SMillerDev avatar Jul 16 '23 09:07 SMillerDev

I asked @pauldix about it here: https://twitter.com/kaspergrubbe/status/1684535376294154240

My understanding:

  • The newest rubygem (this repo) doesn't speak InfluxQL, only Flux.
  • The old rubygem (https://github.com/InfluxCommunity/influxdb-ruby) speaks InfluxQL, not Flux.

Paul Dix answers:

  • Using the old v1 gem is your best bet. InfluxDB 2.0 implements the v1 query API and 3.0 will as well.
  • You'll be able to point to a 3.0 DB as though it is a 1.0 DB.
  • Later, there will be a 3.0 Rubygem that uses the faster Arrow Flight protocol.

kaspergrubbe avatar Jul 28 '23 10:07 kaspergrubbe

@kaspergrubbe I don't quite follow you / @pauldix, old gem's client requires username and password and doesn't seem to support tokens at all.

timdiggins avatar Sep 27 '23 12:09 timdiggins