Created
October 2, 2025 16:19
-
-
Save kylebrandt/ff5fc4061d85fe08fd24f5cee6333414 to your computer and use it in GitHub Desktop.
SQL Expressions Conversion To Full Long Example Dashboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "__inputs": [ | |
| { | |
| "name": "DS_MOCK", | |
| "label": "Mock", | |
| "description": "", | |
| "type": "datasource", | |
| "pluginId": "grafana-mock-datasource", | |
| "pluginName": "Mock" | |
| }, | |
| { | |
| "name": "DS_EXPRESSION", | |
| "label": "Expression", | |
| "description": "", | |
| "type": "datasource", | |
| "pluginId": "__expr__" | |
| } | |
| ], | |
| "__elements": {}, | |
| "__requires": [ | |
| { | |
| "type": "datasource", | |
| "id": "__expr__", | |
| "version": "1.0.0" | |
| }, | |
| { | |
| "type": "grafana", | |
| "id": "grafana", | |
| "name": "Grafana", | |
| "version": "12.3.0-pre" | |
| }, | |
| { | |
| "type": "datasource", | |
| "id": "grafana-mock-datasource", | |
| "name": "Mock", | |
| "version": "0.1.5" | |
| }, | |
| { | |
| "type": "panel", | |
| "id": "table", | |
| "name": "Table", | |
| "version": "" | |
| }, | |
| { | |
| "type": "panel", | |
| "id": "timeseries", | |
| "name": "Time series", | |
| "version": "" | |
| } | |
| ], | |
| "annotations": { | |
| "list": [ | |
| { | |
| "builtIn": 1, | |
| "datasource": { | |
| "type": "grafana", | |
| "uid": "-- Grafana --" | |
| }, | |
| "enable": true, | |
| "hide": true, | |
| "iconColor": "rgba(0, 211, 255, 1)", | |
| "name": "Annotations & Alerts", | |
| "type": "dashboard" | |
| } | |
| ] | |
| }, | |
| "editable": true, | |
| "fiscalYearStartMonth": 0, | |
| "graphTooltip": 0, | |
| "links": [], | |
| "panels": [ | |
| { | |
| "collapsed": false, | |
| "gridPos": { | |
| "h": 1, | |
| "w": 24, | |
| "x": 0, | |
| "y": 0 | |
| }, | |
| "id": 2, | |
| "panels": [], | |
| "title": "Time Series Conversion (Wide)", | |
| "type": "row" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "description": "Host A should have different numbers, seems to be bug in table display?", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "thresholds" | |
| }, | |
| "custom": { | |
| "align": "auto", | |
| "cellOptions": { | |
| "type": "auto" | |
| }, | |
| "footer": { | |
| "reducers": [] | |
| }, | |
| "inspect": false, | |
| "wrapHeaderText": false | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| } | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 9, | |
| "w": 11, | |
| "x": 0, | |
| "y": 1 | |
| }, | |
| "id": 5, | |
| "options": { | |
| "cellHeight": "sm", | |
| "showHeader": true | |
| }, | |
| "pluginVersion": "12.3.0-pre", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "frames": [ | |
| { | |
| "count": 50, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "name": "timestamp", | |
| "type": "timestamp-auto" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "host=a,iface=x", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "1,4,2,3" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "host=b,iface=y", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "6,8,5,9" | |
| } | |
| ], | |
| "frameInputType": "timeseries-wide", | |
| "meta": { | |
| "type": "timeseries-wide" | |
| }, | |
| "name": "New Frame", | |
| "source": "count" | |
| } | |
| ], | |
| "hide": false, | |
| "queryType": "frames_builder", | |
| "refId": "time_series_wide" | |
| } | |
| ], | |
| "title": "Time Series Wide (Before Conversion)", | |
| "type": "table" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "thresholds" | |
| }, | |
| "custom": { | |
| "align": "auto", | |
| "cellOptions": { | |
| "type": "auto" | |
| }, | |
| "footer": { | |
| "reducers": [] | |
| }, | |
| "inspect": false, | |
| "wrapHeaderText": false | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| } | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 9, | |
| "w": 13, | |
| "x": 11, | |
| "y": 1 | |
| }, | |
| "id": 1, | |
| "options": { | |
| "cellHeight": "sm", | |
| "showHeader": true | |
| }, | |
| "pluginVersion": "12.3.0-pre", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "frames": [ | |
| { | |
| "count": 50, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "name": "timestamp", | |
| "type": "timestamp-auto" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "host=a,iface=x", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "1,4,2,3" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "host=b,iface=y", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "6,8,5,9" | |
| } | |
| ], | |
| "frameInputType": "timeseries-wide", | |
| "meta": { | |
| "type": "timeseries-wide" | |
| }, | |
| "name": "New Frame", | |
| "source": "count" | |
| } | |
| ], | |
| "hide": true, | |
| "queryType": "frames_builder", | |
| "refId": "time_series_wide" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "__expr__", | |
| "uid": "${DS_EXPRESSION}" | |
| }, | |
| "expression": "SELECT *\nFROM time_series_wide", | |
| "hide": false, | |
| "refId": "B", | |
| "type": "sql" | |
| } | |
| ], | |
| "title": "Time Series Wide Conversion To Full Long", | |
| "type": "table" | |
| }, | |
| { | |
| "collapsed": false, | |
| "gridPos": { | |
| "h": 1, | |
| "w": 24, | |
| "x": 0, | |
| "y": 10 | |
| }, | |
| "id": 4, | |
| "panels": [], | |
| "title": "Time Series Conversion (Multi)", | |
| "type": "row" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "thresholds" | |
| }, | |
| "custom": { | |
| "align": "auto", | |
| "cellOptions": { | |
| "type": "auto" | |
| }, | |
| "footer": { | |
| "reducers": [] | |
| }, | |
| "inspect": false, | |
| "wrapHeaderText": false | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| } | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 7, | |
| "w": 11, | |
| "x": 0, | |
| "y": 11 | |
| }, | |
| "id": 6, | |
| "options": { | |
| "cellHeight": "sm", | |
| "showHeader": true | |
| }, | |
| "pluginVersion": "12.3.0-pre", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "frames": [ | |
| { | |
| "count": 50, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "name": "timestamp", | |
| "type": "timestamp-auto" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "host=a,iface=x", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "1,4,2,3" | |
| } | |
| ], | |
| "frameInputType": "timeseries-multi", | |
| "meta": { | |
| "type": "timeseries-multi" | |
| }, | |
| "name": "Frame 1", | |
| "source": "count" | |
| }, | |
| { | |
| "count": 50, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "name": "timestamp", | |
| "type": "timestamp-auto" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "host=b,iface=y", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "6,8,5,9" | |
| } | |
| ], | |
| "frameInputType": "timeseries-multi", | |
| "meta": { | |
| "type": "timeseries-multi" | |
| }, | |
| "name": "Frame 2", | |
| "source": "count" | |
| } | |
| ], | |
| "hide": false, | |
| "queryType": "frames_builder", | |
| "refId": "time_series_wide" | |
| } | |
| ], | |
| "title": "Time Series Multi (Before Conversion)", | |
| "type": "table" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "thresholds" | |
| }, | |
| "custom": { | |
| "align": "auto", | |
| "cellOptions": { | |
| "type": "auto" | |
| }, | |
| "footer": { | |
| "reducers": [] | |
| }, | |
| "inspect": false, | |
| "wrapHeaderText": false | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| } | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 7, | |
| "w": 13, | |
| "x": 11, | |
| "y": 11 | |
| }, | |
| "id": 3, | |
| "options": { | |
| "cellHeight": "sm", | |
| "showHeader": true | |
| }, | |
| "pluginVersion": "12.3.0-pre", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "frames": [ | |
| { | |
| "count": 50, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "name": "timestamp", | |
| "type": "timestamp-auto" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "host=a,iface=x", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "1,4,2,3" | |
| } | |
| ], | |
| "frameInputType": "timeseries-multi", | |
| "meta": { | |
| "type": "timeseries-multi" | |
| }, | |
| "name": "New Frame", | |
| "source": "count" | |
| }, | |
| { | |
| "count": 50, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "name": "timestamp", | |
| "type": "timestamp-auto" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "host=b,iface=y", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "6,8,5,9" | |
| } | |
| ], | |
| "frameInputType": "timeseries-multi", | |
| "meta": { | |
| "type": "timeseries-multi" | |
| }, | |
| "name": "New Frame", | |
| "source": "count" | |
| } | |
| ], | |
| "hide": true, | |
| "queryType": "frames_builder", | |
| "refId": "time_series_wide" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "__expr__", | |
| "uid": "${DS_EXPRESSION}" | |
| }, | |
| "expression": "SELECT *\nFROM time_series_wide", | |
| "hide": false, | |
| "refId": "B", | |
| "type": "sql" | |
| } | |
| ], | |
| "title": "Time Series Multi Conversion To Full Long", | |
| "type": "table" | |
| }, | |
| { | |
| "collapsed": false, | |
| "gridPos": { | |
| "h": 1, | |
| "w": 24, | |
| "x": 0, | |
| "y": 18 | |
| }, | |
| "id": 7, | |
| "panels": [], | |
| "title": "Numeric Conversion (Wide)", | |
| "type": "row" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "thresholds" | |
| }, | |
| "custom": { | |
| "align": "auto", | |
| "cellOptions": { | |
| "type": "auto" | |
| }, | |
| "footer": { | |
| "reducers": [] | |
| }, | |
| "inspect": false, | |
| "wrapHeaderText": false | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| } | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 6, | |
| "w": 11, | |
| "x": 0, | |
| "y": 19 | |
| }, | |
| "id": 9, | |
| "options": { | |
| "cellHeight": "sm", | |
| "showHeader": true | |
| }, | |
| "pluginVersion": "12.3.0-pre", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "frames": [ | |
| { | |
| "count": 1, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "labels": "host=a,iface=x", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "3.14" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "host=b,iface=y", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "93.14" | |
| } | |
| ], | |
| "frameInputType": "numeric-wide", | |
| "meta": { | |
| "type": "numeric-wide" | |
| }, | |
| "name": "New Frame", | |
| "source": "count" | |
| } | |
| ], | |
| "hide": false, | |
| "queryType": "frames_builder", | |
| "refId": "numeric_wide" | |
| } | |
| ], | |
| "title": "Numeric Wide (Before Conversion)", | |
| "type": "table" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "thresholds" | |
| }, | |
| "custom": { | |
| "align": "auto", | |
| "cellOptions": { | |
| "type": "auto" | |
| }, | |
| "footer": { | |
| "reducers": [] | |
| }, | |
| "inspect": false, | |
| "wrapHeaderText": false | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| } | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 6, | |
| "w": 13, | |
| "x": 11, | |
| "y": 19 | |
| }, | |
| "id": 8, | |
| "options": { | |
| "cellHeight": "sm", | |
| "showHeader": true | |
| }, | |
| "pluginVersion": "12.3.0-pre", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "frames": [ | |
| { | |
| "count": 1, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "labels": "host=a,iface=x", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "3.14" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "host=b,iface=y", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "93.14" | |
| } | |
| ], | |
| "frameInputType": "numeric-wide", | |
| "meta": { | |
| "type": "numeric-wide" | |
| }, | |
| "name": "New Frame", | |
| "source": "count" | |
| } | |
| ], | |
| "hide": true, | |
| "queryType": "frames_builder", | |
| "refId": "numeric_wide" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "__expr__", | |
| "uid": "${DS_EXPRESSION}" | |
| }, | |
| "expression": "SELECT *\nFROM numeric_wide", | |
| "hide": false, | |
| "refId": "B", | |
| "type": "sql" | |
| } | |
| ], | |
| "title": "Numeric Wide Conversion To Numeric Full Long", | |
| "type": "table" | |
| }, | |
| { | |
| "collapsed": false, | |
| "gridPos": { | |
| "h": 1, | |
| "w": 24, | |
| "x": 0, | |
| "y": 25 | |
| }, | |
| "id": 10, | |
| "panels": [], | |
| "title": "Numeric Conversion (Multi)", | |
| "type": "row" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "thresholds" | |
| }, | |
| "custom": { | |
| "align": "auto", | |
| "cellOptions": { | |
| "type": "auto" | |
| }, | |
| "footer": { | |
| "reducers": [] | |
| }, | |
| "inspect": false, | |
| "wrapHeaderText": false | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| } | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 6, | |
| "w": 7, | |
| "x": 0, | |
| "y": 26 | |
| }, | |
| "id": 12, | |
| "options": { | |
| "cellHeight": "sm", | |
| "frameIndex": 0, | |
| "showHeader": true | |
| }, | |
| "pluginVersion": "12.3.0-pre", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "frames": [ | |
| { | |
| "count": 1, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "labels": "host=a", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "3.14" | |
| } | |
| ], | |
| "frameInputType": "numeric-many", | |
| "meta": { | |
| "type": "numeric-multi" | |
| }, | |
| "name": "Frame 1", | |
| "source": "count" | |
| }, | |
| { | |
| "count": 1, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "labels": "host=b", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "93.14" | |
| } | |
| ], | |
| "frameInputType": "numeric-many", | |
| "name": "Frame 2", | |
| "source": "count" | |
| } | |
| ], | |
| "hide": false, | |
| "queryType": "frames_builder", | |
| "refId": "numeric_multi" | |
| } | |
| ], | |
| "title": "Numeric Multi (No Conversion)", | |
| "type": "table" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "thresholds" | |
| }, | |
| "custom": { | |
| "align": "auto", | |
| "cellOptions": { | |
| "type": "auto" | |
| }, | |
| "footer": { | |
| "reducers": [] | |
| }, | |
| "inspect": false, | |
| "wrapHeaderText": false | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| } | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 6, | |
| "w": 9, | |
| "x": 7, | |
| "y": 26 | |
| }, | |
| "id": 11, | |
| "options": { | |
| "cellHeight": "sm", | |
| "showHeader": true | |
| }, | |
| "pluginVersion": "12.3.0-pre", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "frames": [ | |
| { | |
| "count": 1, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "labels": "host=a", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "3.14" | |
| } | |
| ], | |
| "frameInputType": "numeric-many", | |
| "meta": { | |
| "type": "numeric-multi" | |
| }, | |
| "name": "New Frame", | |
| "source": "count" | |
| }, | |
| { | |
| "count": 1, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "labels": "host=b", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "93.14" | |
| } | |
| ], | |
| "frameInputType": "numeric-many", | |
| "name": "New Frame", | |
| "source": "count" | |
| } | |
| ], | |
| "hide": true, | |
| "queryType": "frames_builder", | |
| "refId": "numeric_multi" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "__expr__", | |
| "uid": "${DS_EXPRESSION}" | |
| }, | |
| "expression": "SELECT *\nFROM numeric_multi", | |
| "hide": false, | |
| "refId": "B", | |
| "type": "sql" | |
| } | |
| ], | |
| "title": "Numeric Multi Conversion To Numeric Full Long", | |
| "type": "table" | |
| }, | |
| { | |
| "collapsed": false, | |
| "gridPos": { | |
| "h": 1, | |
| "w": 24, | |
| "x": 0, | |
| "y": 32 | |
| }, | |
| "id": 14, | |
| "panels": [], | |
| "title": "Conversion Errors", | |
| "type": "row" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 0, | |
| "gradientMode": "none", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "linear", | |
| "lineWidth": 1, | |
| "pointSize": 5, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "auto", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "none" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| } | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 8, | |
| "x": 0, | |
| "y": 33 | |
| }, | |
| "id": 13, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "list", | |
| "placement": "bottom", | |
| "showLegend": true | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| } | |
| }, | |
| "pluginVersion": "12.3.0-pre", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "frames": [ | |
| { | |
| "count": 60, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "name": "timestamp", | |
| "type": "timestamp-auto" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "a=b", | |
| "name": "value", | |
| "type": "nullable-float64", | |
| "value": "1,2,3,2" | |
| } | |
| ], | |
| "frameInputType": "timeseries", | |
| "name": "New Frame", | |
| "source": "count" | |
| } | |
| ], | |
| "queryType": "frames_builder", | |
| "refId": "A" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "__expr__", | |
| "uid": "${DS_EXPRESSION}" | |
| }, | |
| "expression": "SELECT *\n FROM A\n LIMIT 10", | |
| "hide": false, | |
| "refId": "B", | |
| "type": "sql" | |
| } | |
| ], | |
| "title": "No Type & Response has Labels", | |
| "type": "timeseries" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 0, | |
| "gradientMode": "none", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "linear", | |
| "lineWidth": 1, | |
| "pointSize": 5, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "auto", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "none" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| } | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 8, | |
| "x": 8, | |
| "y": 33 | |
| }, | |
| "id": 15, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "list", | |
| "placement": "bottom", | |
| "showLegend": true | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| } | |
| }, | |
| "pluginVersion": "12.3.0-pre", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "frames": [ | |
| { | |
| "count": 60, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "name": "timestamp", | |
| "type": "timestamp-auto" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "host=a", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "1,4,2,3" | |
| } | |
| ], | |
| "frameInputType": "timeseries-multi", | |
| "meta": { | |
| "type": "histogram" | |
| }, | |
| "name": "New Frame", | |
| "source": "count" | |
| }, | |
| { | |
| "count": 60, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "name": "timestamp", | |
| "type": "timestamp-auto" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "host=b", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "6,8,5,9" | |
| } | |
| ], | |
| "frameInputType": "timeseries-multi", | |
| "meta": { | |
| "type": "timeseries-multi" | |
| }, | |
| "name": "New Frame", | |
| "source": "count" | |
| } | |
| ], | |
| "generatorSource": "frontend", | |
| "queryType": "raw_frame", | |
| "rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"\",\n \"typeVersion\": [0, 1],\n \"custom\": {\n \"exampleInfo\": {\n \"summary\": \"TimeseriesMulti with 2 items. There is 1 item name (slothCount) and 1 dimension (city). The timestamps are not aligned between the two series.\",\n \"itemCount\": 2,\n \"collectionVersion\": 1,\n \"valid\": true,\n \"noData\": false\n }\n }\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"LGA\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [1664901845976, 1664902845976],\n [3, 5]\n ]\n }\n },\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-multi\",\n \"typeVersion\": [0, 1],\n \"custom\": {\n \"exampleInfo\": {\n \"valid\": true,\n \"noData\": false\n }\n }\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"MIA\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [1664901855976, 1664902455976, 1664902855976],\n [6, 7, 9]\n ]\n }\n }\n]", | |
| "rawFrameSource": "inline", | |
| "refId": "A", | |
| "resultState": "success", | |
| "scenario": "no-data" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "__expr__", | |
| "uid": "${DS_EXPRESSION}" | |
| }, | |
| "expression": "SELECT *\n FROM A\n LIMIT 10", | |
| "hide": false, | |
| "refId": "B", | |
| "type": "sql" | |
| } | |
| ], | |
| "title": "Multiple Frames No Type", | |
| "type": "timeseries" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 0, | |
| "gradientMode": "none", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "linear", | |
| "lineWidth": 1, | |
| "pointSize": 5, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "auto", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "none" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| } | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 8, | |
| "x": 0, | |
| "y": 41 | |
| }, | |
| "id": 16, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "list", | |
| "placement": "bottom", | |
| "showLegend": true | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| } | |
| }, | |
| "pluginVersion": "12.3.0-pre", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "frames": [ | |
| { | |
| "count": 60, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "name": "timestamp", | |
| "type": "timestamp-auto" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "a=b", | |
| "name": "value", | |
| "type": "nullable-float64", | |
| "value": "1,2,3,2" | |
| } | |
| ], | |
| "frameInputType": "timeseries", | |
| "meta": { | |
| "type": "slothArt" | |
| }, | |
| "name": "New Frame", | |
| "source": "count" | |
| } | |
| ], | |
| "queryType": "frames_builder", | |
| "refId": "A" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "__expr__", | |
| "uid": "${DS_EXPRESSION}" | |
| }, | |
| "expression": "SELECT *\n FROM A\n LIMIT 10", | |
| "hide": false, | |
| "refId": "B", | |
| "type": "sql" | |
| } | |
| ], | |
| "title": "Unsupported Type & Response has Labels", | |
| "type": "timeseries" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 0, | |
| "gradientMode": "none", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "linear", | |
| "lineWidth": 1, | |
| "pointSize": 5, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "auto", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "none" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| } | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 8, | |
| "x": 8, | |
| "y": 41 | |
| }, | |
| "id": 17, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "list", | |
| "placement": "bottom", | |
| "showLegend": true | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| } | |
| }, | |
| "pluginVersion": "12.3.0-pre", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "frames": [ | |
| { | |
| "count": 60, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "name": "timestamp", | |
| "type": "string", | |
| "value": "a,b,c,d" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "a=b", | |
| "name": "value", | |
| "type": "nullable-float64", | |
| "value": "1,2,3,2" | |
| } | |
| ], | |
| "frameInputType": "timeseries", | |
| "meta": { | |
| "type": "timeseries-wide" | |
| }, | |
| "name": "New Frame", | |
| "source": "count" | |
| } | |
| ], | |
| "queryType": "frames_builder", | |
| "refId": "A" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "__expr__", | |
| "uid": "${DS_EXPRESSION}" | |
| }, | |
| "expression": "SELECT *\n FROM A\n LIMIT 10", | |
| "hide": false, | |
| "refId": "B", | |
| "type": "sql" | |
| } | |
| ], | |
| "title": "Type Time but no Time Field", | |
| "type": "timeseries" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 0, | |
| "gradientMode": "none", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "linear", | |
| "lineWidth": 1, | |
| "pointSize": 5, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "auto", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "none" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| } | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 8, | |
| "x": 0, | |
| "y": 49 | |
| }, | |
| "id": 18, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "list", | |
| "placement": "bottom", | |
| "showLegend": true | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| } | |
| }, | |
| "pluginVersion": "12.3.0-pre", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "grafana-mock-datasource", | |
| "uid": "${DS_MOCK}" | |
| }, | |
| "frames": [ | |
| { | |
| "count": 60, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "name": "timestamp", | |
| "type": "timestamp-auto" | |
| }, | |
| { | |
| "disabled": false, | |
| "labels": "host=a", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "1,4,2,3" | |
| } | |
| ], | |
| "frameInputType": "timeseries-multi", | |
| "meta": { | |
| "type": "timeseries-multi" | |
| }, | |
| "name": "New Frame", | |
| "source": "count" | |
| }, | |
| { | |
| "count": 60, | |
| "disabled": false, | |
| "fields": [ | |
| { | |
| "disabled": false, | |
| "labels": "host=b", | |
| "name": "cpu", | |
| "type": "nullable-float64", | |
| "value": "6,8,5,9" | |
| } | |
| ], | |
| "frameInputType": "timeseries-multi", | |
| "meta": { | |
| "type": "numeric-multi" | |
| }, | |
| "name": "New Frame", | |
| "source": "count" | |
| } | |
| ], | |
| "queryType": "frames_builder", | |
| "refId": "A" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "__expr__", | |
| "uid": "${DS_EXPRESSION}" | |
| }, | |
| "expression": "SELECT *\n FROM A\n LIMIT 10", | |
| "hide": false, | |
| "refId": "B", | |
| "type": "sql" | |
| } | |
| ], | |
| "title": "Type Time but no Time Field", | |
| "type": "timeseries" | |
| } | |
| ], | |
| "schemaVersion": 42, | |
| "tags": [], | |
| "templating": { | |
| "list": [] | |
| }, | |
| "time": { | |
| "from": "now-1m", | |
| "to": "now" | |
| }, | |
| "timepicker": {}, | |
| "timezone": "utc", | |
| "title": "SQL Expression \"Metrics\" Conversion", | |
| "uid": "d56e24c4-ffab-4604-a6db-94782a5bae88", | |
| "version": 10, | |
| "weekStart": "", | |
| "id": null | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment