Note: this is a beginner generic question to better understand the kind of actions I can take with my data. I used so far Kibana, SQL and developed my own graphs with Highcharts.
I connected Grafana to an SQLite file and to an Elasticsearch instance.
I noticed that what is required on the SQL part is a query that does the processing of the data and provides a table to graph. Something like the following to get the top 10 cities with a specific event
select
CITY,
count(CITY)
from consolidated_results
group by CITY
order by count(CITY) desc
limit 10
This is a good input to a bar chart, but not to a pie one for instance.
Should I have a similar approach to Elasticsearch? That is: to build a query that will output the data formatted in a “table” so that it can be readily plotted?
And generally: should the query to a data source always send back data formatted for a specific chart type? (or is Grafana also doing processing of the received data to format it for a chart? via a Transform? )