google/ts-bridge

InfluxDB metric source - check that queries contain just 1 column

Opened this issue · 2 comments

InfluxDB metric source is configured by specifying a query, this query must have 1 column, so that it returns just 1 value.
We're not checking this in validateQuery , as a result we throw errors that are not very intuitive (like "cannot create metric '<metric_name>': not an App Engine context "

Actually "not an App Engine context " is related to the other problem described in #33 , but the check for 1 column in queries still need to be implemented.

We check at runtime: https://github.com/google/ts-bridge/blob/master/influxdb/metric.go#L297

Issue with checking beforehand is that is the user defines a select * on some continuous fn or table, we can't verify it.