Open Joris97 opened 2 months ago
I suspect the Timestamp
might not be recognized as a time value. Do you see time icon when you go to Query inspector -> Data ?
Try explicitly casting Timestamp to datetime in your SQL query. Do you see any logs in the console?
It seems that it recognizes it as an timestamp if that is what the clock symbol is for
Click F12 in your browser and check if you see any warnings in the console. Additionally, make sure you are running the latest version by uninstalling and installing the plugin again.
Hi @Joris97
You should change query.
Please write it like this (add as time
to timestamp):
SELECT TOP 1000
TimeStamp as time,
nozzletemp
FROM
DB_xxxxxxxxxxxxxxx
WHERE
TimeStamp BETWEEN '2024-04-25 14:25:28' AND '2024-04-25 14:33:01'
ORDER BY
TimeStamp DESC;
Or write this SQL query in "table' format:
@mrtomeq I just downloaded the newest release from GitHub and extracted it to the data/plugins folder. It now still works with the random walk. I do get the following warning:
However, I also get this error when using random walk.
@mrGnowak When I set the format to time series and I do not import as time, I do get an error. However, if I use table I do not get an error "no time column" even if I do not do the 'as time' comment. But still unfortunately do not get the graph displayed with all the different formats and import options. so this is quite weird, I'll also try another data source to excuse problems with the data.
It has something to do with the data or import because other sample data from influxdb does work
This inner-spin-button is just a warning about deprecated component. This is not a problem.
When you select the time series
format, grafana requires the time
column. After selecting the table
, we check the data format. It should work on the Table
format.
SELECT top(100) Exhausttemp, TimeStamp as time FROM DB_xxxxxxxxxx
ORDER BY timestamp DESC;
;
The response:
"results": { "A": { "status": 200, "frames": [ { "schema": { "refId": "A", "meta": { "typeVersion": [ 0, 0 ], "executedQueryString": "SELECT top(100)\r\n Exhausttemp, TimeStamp as time\r\nFROM \r\n DB_xxxxxxxxx \r\n\r\nORDER BY timestamp DESC;\r\n \r\n \r\n ;" }, "fields": [ { "name": "Exhausttemp", "type": "number", "typeInfo": { "frame": "float64", "nullable": true } }, { "name": "Time", "type": "time", "typeInfo": { "frame": "time.Time" } } ] }, "data": { "values": [ [ 39.9, 39.9, 39.9, 40, 39.9, 40, 40, 40, 40.1, 40.1, 40.1, 40.1, 40.1, 40.1, 40.1, 40.1, 40.1, 40.1, 40.2, 40.2, 40.2, 40.2, 40.2, 40.3, 40.3, 40.3, 40.3, 40.3, 40.3, 40.4, 40.4, 40.4, 40.4, 40.4, 40.4, 40.4, 40.4, 40.4, 40.4, 40.4, 40.5, 40.5, 40.5, 40.5, 40.5, 40.5, 40.6, 40.6, 40.6, 40.6, 40.6, 40.6, 40.6, 40.6, 40.6, 40.6, 40.6, 40.7, 40.6, 40.7, 40.7, 40.7, 40.7, 40.7, 40.7, 40.7, 40.8, 40.8, 40.8, 40.8, 40.8, 40.8, 40.8, 40.8, 40.8, 40.9, 40.9, 40.9, 40.9, 40.9, 40.9, 40.9, 40.9, 40.9, 40.9, 40.9, 40.9, 40.9, 40.9, 40.9, 40.9, 40.9, 41, 41, 41, 41, 41, 41, 41, 41 ], [ 1714398041913, 1714398039813, 1714398038720, 1714398037717, 1714398036717, 1714398035703, 1714398034733, 1714398033717, 1714398032710, 1714398031710, 1714398030710, 1714398029693, 1714398028710, 1714398027690, 1714398026680, 1714398025680, 1714398024697, 1714398023667, 1714398022680, 1714398021667, 1714398020650, 1714398019697, 1714398018650, 1714398016603, 1714398014610, 1714398012503, 1714398010503, 1714398008390, 1714398006280, 1714398005390, 1714398004187, 1714398003167, 1714398002167, 1714398001163, 1714398000160, 1714397999160, 1714397998160, 1714397997160, 1714397996147, 1714397995147, 1714397994740, 1714397992107, 1714397990013, 1714397987903, 1714397985807, 1714397984710, 1714397983697, 1714397982713, 1714397981680, 1714397980680, 1714397979697, 1714397978680, 1714397977680, 1714397976680, 1714397975693, 1714397974693, 1714397973677, 1714397972677, 1714397971660, 1714397970660, 1714397969647, 1714397968647, 1714397967647, 1714397967240, 1714397965647, 1714397963590, 1714397961580, 1714397959577, 1714397957483, 1714397955500, 1714397953700, 1714397951420, 1714397949420, 1714397947373, 1714397945310, 1714397944230, 1714397943183, 1714397942387, 1714397941167, 1714397940153, 1714397939150, 1714397938167, 1714397937150, 1714397936150, 1714397935167, 1714397934160, 1714397933147, 1714397932160, 1714397930100, 1714397927973, 1714397926567, 1714397923897, 1714397921783, 1714397920673, 1714397919723, 1714397918690, 1714397917670, 1714397916670, 1714397915670, 1714397914670 ] ] } } ] } } }
This is one from a working query: " "results": { "A": { "status": 200, "frames": [ { "schema": { "name": "boltdb_reads_total", "refId": "A", "meta": { "typeVersion": [ 0, 0 ], "executedQueryString": "from(bucket: \"test\")\r\n |\u003e range(start: 2024-04-29T02:51:27.258Z, stop: 2024-04-29T14:51:27.258Z)\r\n |\u003e filter(fn: (r) =\u003e r[\"_measurement\"] == \"storage_bucket_measurement_num\" or r[\"_measurement\"] == \"boltdb_reads_total\")\r\n |\u003e aggregateWindow(every: 1m0s, fn: mean, createEmpty: false)\r\n |\u003e yield(name: \"mean\")\r\n " }, "fields": [ { "name": "Time", "type": "time", "typeInfo": { "frame": "time.Time", "nullable": true } }, { "name": "counter", "type": "number", "typeInfo": { "frame": "float64", "nullable": true }, "labels": {} } ] }, "data": { "values": [ [ 1714379280000, 1714379340000, 1714379400000, 1714379460000, 1714379520000, 1714379580000, 1714379640000, 1714379700000, 1714379760000, 1714379820000, 1714379880000, 1714379940000, 1714380000000, 1714380060000, 1714380120000, 1714380180000, 1714380240000, 1714380300000, 1714380360000, 1714380420000, 1714380480000, 1714380540000, 1714380600000, 1714380660000, 1714380720000, 1714380780000, 1714380840000, 1714380900000, 1714380960000, 1714381020000, 1714381080000, 1714381140000, 1714381200000, 1714381260000, 1714381320000, 1714381380000, 1714381440000, 1714381500000, 1714381560000, 1714381620000, 1714381680000, 1714381740000, 1714381800000, 1714381860000, 1714381920000, 1714381980000, 1714382040000, 1714382100000, 1714382160000, 1714382220000, 1714382280000, 1714382340000, 1714382400000, 1714382460000, 1714382520000, 1714382580000, 1714382640000, 1714382700000, 1714382760000, 1714382820000, 1714382880000, 1714382940000, 1714383000000, 1714383060000, 1714383120000, 1714383180000, 1714383240000, 1714383300000, 1714383360000, 1714383420000, 1714383480000, 1714383540000, 1714383600000, 1714383660000, 1714383960000, 1714384020000, 1714384080000, 1714384140000, 1714384200000, 1714384260000, 1714402260000, 1714402287258 ], [ 10, 18, 34.666666666666664, 48.5, 76.83333333333333, 100, 112, 126.5, 139, 151, 163, 175, 187, 199, 211, 227.66666666666666, 271.3333333333333, 287.3333333333333, 303.3333333333333, 338.5, 388.3333333333333, 404.3333333333333, 421.3333333333333, 450.3333333333333, 485.6666666666667, 511, 545.6666666666666, 574.5, 631.3333333333334, 705.1666666666666, 725, 741, 757, 773, 789, 805, 821, 837, " etc.
@Joris97 Join our discord, it will be easier for us to communicate and help. The problem looks strange. It is difficult to find the cause without more detailed information
@Joris97 We were able to reproduce the problem with MSSQL datasource and are working on the fix.
Oke, good to hear! Thanks for all the help :)
I try to use the plugin, it works when using random walk sample data but when I use actual data from a SQL database it does not show the graph. This is the query I use; SELECT TOP 1000 TimeStamp, nozzletemp FROM DB_xxxxxxxxxxxxxxx WHERE TimeStamp BETWEEN '2024-04-25 14:25:28' AND '2024-04-25 14:33:01' ORDER BY TimeStamp DESC;
There is a time and value so I thought this would be sufficient, what am I missing? The selected sample data in time series graph:![image](https://github.com/KensoBI/spc-panel/assets/168173929/ca0eae2d-f6e4-417e-ab11-0a673d2e423c)