1

I am using Grafana mysql data connector and trying to write a select query. The select query is throwing an error - "Found no column named time or time_sec"

Here is the query
SELECT main_id, ipaddress FROM table1;
meallhour
  • 13,921
  • 21
  • 60
  • 117

1 Answers1

4

This happens when you are using a "Graph" visualisation, with X-Axis mode set to "Time" like this, because grafana is trying to find what time series to map the graph against:

graph-visualisation-with-time-mode

From your query, it seems like you're looking to visualise a data that does not have a time series.

Depending on the data you are playing with & your goal, either:

  • Change the X-Axis mode to "Series" and pick the relevant numeric column to map the X-Axis against
  • Or choose a more apt Visualization other than "Graph"
  • Or change the query to have a "time" column
droidbot
  • 937
  • 1
  • 10
  • 26
  • I have modified my query and included `complete_dt` column as below: `SELECT main_id, ipaddress, complete_dt, UNIX_TIMESTAMP(complete_dt) as time_sec FROM table1 p where p.complete_dt >= '2017-10-01';` I am now getting below error: `Value column must have numeric datatype, column: complete_dt type: time.Time value: 2019-01-02 07:42:52 +0000 UTC` – meallhour Dec 09 '19 at 17:25