Using timeline from Grafana dashboard to get count

  • What Grafana version and what operating system are you using? v 9.4.3

  • What are you trying to achieve? I would like to use Grafanas timerange property in dashboard, based on which to get the count to a Bigquery database

  • How are you trying to achieve it?---->I use a query to Bigquery dataset select time, count(*) from ‘dataset.table’ where date(timeInterval)=current_date() group by time order by time. The result is displayed as a bar chart in a panel. The result contains for the current date.

  • What happened? I cant seem to find a way to pass the timerange property from Grafana dashboard(like past 6 hours, 3 hours etc) to my query instead of for the whole date? Is this even possible?

  • What did you expect to happen? —My expectation is to pass this range to my query if possible

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?

Hello @fetolicij

Can you confirm that you using this plugin with Grafana to query your BigQuery data warehouse? If yes, then it appears all you need to do is change this:

to this:

select time, count(*) from ‘dataset.table’ WHERE $__timeFilter(time_column) group by time order by time