The sql datasources went through a breaking change in v8, where they now handle dataframes in a more versatile manner. Quickly, have you tried changing the query to return the data as a table
and not time-series
?
There is a larger discussion about this issue and how to handle it in our changelog. Check this out and let us know if it helps you get unblocked:
Upgrade Grafana | Grafana documentation
Grafana v8.0 changes the underlying data structure to data frames for the Postgres, MySQL, Microsoft SQL Server data sources. As a result, a Time series query result gets returned in a wide format. To make the visualizations work as they did before, you might have to do some manual migrations.
For any existing panels/visualizations using a Time series query, where the time column is only needed for filtering the time range, for example, using the bar gauge or pie chart panel, we recommend that you use a Table query instead and exclude the time column as a field in the response.
Refer to this issue comment for detailed instructions and workarounds.