InfluxDB: Query builder produces invalid SQL query when using wildcard column name #88008
Labels
datasource/InfluxDB
good first issue
Good for newcomers
internal
for issues made by grafanistas
prio/medium
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
type/bug
Problem
When using the InfluxDB data source in SQL mode, the query builder can't run queries with a wildcard column name (
SELECT *
). Choosing*
in the Column select leads to an error:Example query on main
This happens because we are wrapping all column names in double-quotes and not considering
*
as a special case:grafana/public/app/plugins/datasource/influxdb/fsql/sqlUtil.ts
Lines 28 to 29 in 7726631
Proposed solution
When the column name is
*
, do not wrap the column name in double-quotes.I made this change locally, and everything worked as expected:
Example query with code change
The text was updated successfully, but these errors were encountered: