fr-ser / grafana-sqlite-datasource

Grafana Plugin to enable SQLite as a Datasource
Apache License 2.0
124 stars 17 forks source link

Unable to Graph INTEGER #60

Closed lucywinters closed 2 years ago

lucywinters commented 2 years ago

Hi Sergej,

I seem to be unable to graph data that is stored as an INTEGER in my sqlite DB. I have some values as REAL and they work just fine.

I was hoping you might be able to offer some guidance?

SQLite Table Structure 7|P_Grid|REAL|0||0 8|P_Load|REAL|0||0\n 9|P_PV|INTEGER|0||0 10|Timestamp|TEXT|0||0

If I use the following Query in Grafana it graphs P_Grid & P_Load (both REAL values) WITH converted AS ( SELECT P_Load, P_Grid,Timestamp AS datetime FROM site WHERE Timestamp ) SELECT datetime, P_Load, P_Grid FROM converted ORDER BY datetime ASC

When I try to add the P_PV value (which is INTEGER) it nothing shows on the graph for P_PV. Grafana Query below WITH converted AS ( SELECT P_Load, P_Grid, P_PV, Timestamp AS datetime FROM site WHERE Timestamp ) SELECT datetime, P_Load, P_Grid, P_PV FROM converted ORDER BY datetime ASC

Screenshot below shows P_PV values in table Screenshot from 2021-09-20 16-59-24

Screenshot below shows P_PV as part of query, but not showing on graph Screenshot from 2021-09-20 16-58-39

I'm sure this is a simple issue and user error, but I would be so happy for any assistance.

Kind Regards

Lucy

fr-ser commented 2 years ago

What version of the SQLite plugin are you using? And what version of Grafana?

lucywinters commented 2 years ago

Grafana v7.0.0 SQLite plugin 0.1.5

fr-ser commented 2 years ago

Bot the plugin and Grafana version is not officially supported anymore by me 😆 Can you at least try with an updated plugin?

lucywinters commented 2 years ago

Oh My... I'll give you a big hug! It's working now..... I truly am extremely sorry for having wasted your time on such a simple issue, which was once again user error. I've updated to: Grafana v8.1.4 SQLite plugin 2.1.0

and it magically works now. Thank You So Much

Lucy

fr-ser commented 2 years ago

Glad to hear that. Always happy to help!