Hi,
I’m using the Ruby InfluxDB API. This query fails to parse when called via Ruby, but the query works (with or without edit) in the InfluxDB cli tool. Oddly, editing an unrelated part of the query from the parse error causes it to succeed.
The query:
SELECT SUM(call_count) as call_count, SUM(call_time) as total_call_time, MAX(max_call_time) as max_call_time, MEAN(percentile_95th) as percentile_95th
FROM org_1.dbmetrics.dbmetrics_1
WHERE
time >= 1507136400s
AND time < 1507741200s
AND (app = '6')
AND ((model_name = 'Request' AND operation = 'save') OR (model_name = 'Request' AND operation = 'find'))
GROUP BY model_name,operation,scope
With:
{"error":"error parsing query: found ), expected identifier, string, number, bool at line 7, char 10"}
The odd part:
- If I remove
scope
from the GROUP BY, the query works. - If I run the query directly via Influx console, the query works.
Wrapping scope
in double quotes has no impact, and nothing here appears to be a reserved keyword.
I’m running InfluxDB version 1.2.0 on OSX and the influxdb ruby gem is version 0.3.16.