Closed sbengo closed 3 months ago
Thanks @Slach for reading it and setting up as 2.6.0 milestone.
I think the current issue, is also related with the current dataframes: the plugin is using and old implementation (Name/Time/Value), which seems a bit abandoned by the Grafana team... (#478 ) and we cannot take profit of the different "labels" features,
Sorry about the following question, but it is an stopper for us and our internal roadmap: Do you have an estimated release date for 2.6.0?
no we don't have ETA
you could try to use Grafana Labs plugin for ClickHouse https://grafana.com/grafana/plugins/grafana-clickhouse-datasource/
As a quick workaround you could use:
SELECT
$timeSeries as t,
count() AS value,
concat(toString(id),' ', toString(attributes)) AS label
FROM $table
WHERE $timeFilter
GROUP BY
t,
label
ORDER BY t
similar with https://github.com/Altinity/clickhouse-grafana/issues/189
maybe we need to make toString on plugin-side on JavaScript and Golang alerts parts
Hi,
We have a CH schema with a field defined as
Map(String,String)
. When we try to perform a simple query from Grafana on theTimeSeries
panel and asTimeSeries
format, the Map value is not expanded and not included as part of the serie. It is working as"Table format"
mode.The idea is to be able to retrieve the value as a
dict
(ormap[string]string
) and use theExtract Field
Grafana transformation to generate the desired columns, but the generated dataframe seems to concat the string values with anobject Object
result, being unable to use it.The following snippet is the "Support" feature that extracts the result Dataframe processed by the backend, with no transformations. There you can check that the generated dataframe is built with
Name - Value - Time
, with the non-expanded map is set as[object Object]
on the dataframes namePanel debug snapshot dashboard
```json { "panels": [ { "datasource": { "type": "grafana", "uid": "grafana" }, "fieldConfig": { "defaults": { "custom": { "drawStyle": "line", "lineInterpolation": "linear", "barAlignment": 0, "lineWidth": 1, "fillOpacity": 0, "gradientMode": "none", "spanNulls": false, "showPoints": "auto", "pointSize": 5, "stacking": { "mode": "none", "group": "A" }, "axisPlacement": "auto", "axisLabel": "", "axisColorMode": "text", "scaleDistribution": { "type": "linear" }, "axisCenteredZero": false, "hideFrom": { "tooltip": false, "viz": false, "legend": false }, "thresholdsStyle": { "mode": "off" } }, "color": { "mode": "palette-classic" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 13, "w": 15, "x": 0, "y": 0 }, "id": 2, "options": { "tooltip": { "mode": "single", "sort": "none" }, "legend": { "showLegend": true, "displayMode": "list", "placement": "bottom", "calcs": [] } }, "targets": [ { "refId": "A", "datasource": { "type": "grafana", "uid": "grafana" }, "queryType": "snapshot", "snapshot": [ { "schema": { "name": "id1, [object Object]", "fields": [ { "name": "Time", "type": "time", "config": {} }, { "name": "Value", "type": "number", "config": {} } ] }, "data": { "values": [ [ 1694517223000, 1694517237000 ], [ 1, null ] ] } }, { "schema": { "name": "id2, [object Object]", "fields": [ { "name": "Time", "type": "time", "config": {} }, { "name": "Value", "type": "number", "config": {} } ] }, "data": { "values": [ [ 1694517223000, 1694517237000 ], [ null, 1 ] ] } }, { "schema": { "name": "id3, [object Object]", "fields": [ { "name": "Time", "type": "time", "config": {} }, { "name": "Value", "type": "number", "config": {} } ] }, "data": { "values": [ [ 1694517223000, 1694517237000, 1694517250000 ], [ null, null, 1 ] ] } } ] } ], "title": "Reproduced with embedded data", "transformations": [], "type": "timeseries" }, { "gridPos": { "h": 7, "w": 9, "x": 15, "y": 0 }, "id": 5, "options": { "content": "Repro case:
Insert values to mock a TimeSeries:
Create a simple Grafana graph: