{ "__inputs": [ { "name": "DS_GITHUB-DEMO-CLUSTER-ALTINITY", "label": "github-demo-cluster-altinity", "description": "", "type": "datasource", "pluginId": "vertamedia-clickhouse-datasource", "pluginName": "Altinity plugin for ClickHouse" } ], "__elements": {}, "__requires": [ { "type": "panel", "id": "geomap", "name": "Geomap", "version": "" }, { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "11.2.0-72125" }, { "type": "panel", "id": "heatmap", "name": "Heatmap", "version": "" }, { "type": "panel", "id": "stat", "name": "Stat", "version": "" }, { "type": "panel", "id": "timeseries", "name": "Time series", "version": "" }, { "type": "datasource", "id": "vertamedia-clickhouse-datasource", "name": "Altinity plugin for ClickHouse", "version": "3.1.0" } ], "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "description": "ClickHouse dashhboard for sample data from the Airline Carrier On-Time dataset from US Bureau of Transportation Statistics. ", "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [], "panels": [ { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 7, "panels": [], "title": "Flight Statistics for All Carriers", "type": "row" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 4, "w": 5, "x": 0, "y": 1 }, "id": 2, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "firstNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.2.0-72125", "targets": [ { "add_metadata": true, "database": "default", "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "dateColDataType": "FlightDate", "dateTimeType": "DATETIME", "editorMode": "builder", "extrapolate": true, "format": "table", "formatAs": "time_series", "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", "interval": "", "intervalFactor": 1, "query": "SELECT countDistinct(Carrier) FROM $table", "rawQuery": "/* grafana dashboard=Ontime Database Carrier and Airport Stats, user=1 */\nSELECT countDistinct(Carrier) FROM default.ontime", "refId": "A", "round": "0s", "showFormattedSQL": true, "showHelp": false, "skip_comments": true, "step": "", "table": "ontime" } ], "title": "Total Carriers", "type": "stat" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "#EAB839", "value": 10 }, { "color": "red", "value": 20 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 19, "x": 5, "y": 1 }, "id": 12, "options": { "basemap": { "config": {}, "name": "Layer 0", "type": "default" }, "controls": { "mouseWheelZoom": true, "showAttribution": true, "showDebug": false, "showMeasure": false, "showScale": false, "showZoom": true }, "layers": [ { "config": { "showLegend": true, "style": { "color": { "field": "DelayPercentage", "fixed": "red" }, "opacity": 0.5, "rotation": { "fixed": 0, "max": 360, "min": -360, "mode": "mod" }, "size": { "field": "Flights", "fixed": 5, "max": 15, "min": 2 }, "symbol": { "fixed": "img/icons/marker/circle.svg", "mode": "fixed" }, "symbolAlign": { "horizontal": "center", "vertical": "center" }, "textConfig": { "fontSize": 12, "offsetX": 0, "offsetY": 0, "textAlign": "center", "textBaseline": "middle" } } }, "location": { "mode": "auto" }, "name": "Layer 1", "tooltip": true, "type": "markers" } ], "tooltip": { "mode": "details" }, "view": { "allLayers": true, "id": "north-america", "lat": 40, "lon": -100, "zoom": 4 } }, "pluginVersion": "11.2.0-72125", "targets": [ { "add_metadata": true, "database": "default", "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "dateTimeColDataType": "toDateTime(FlightDate)", "dateTimeType": "DATETIME", "editorMode": "builder", "extrapolate": true, "format": "table", "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", "interval": "", "intervalFactor": 1, "query": "SELECT Dest, Flights, DelayPercentage, dest.Name, dest.Latitude, dest.Longitude \r\nFROM \r\n(\r\n SELECT Dest, count() AS Flights, sum(ArrDel15)/Flights*100.0 as DelayPercentage FROM ontime\r\n WHERE $timeFilter \r\n GROUP BY Dest\r\n) AS o \r\nJOIN airports AS dest ON o.Dest = dest.IATA \r\n", "rawQuery": "/* grafana dashboard=Ontime Database Carrier and Airport Stats, user=1 */\nSELECT Dest, Flights, DelayPercentage, dest.Name, dest.Latitude, dest.Longitude,\r\nmultiIf(DelayPercentage < 3, 'green', DelayPercentage < 10, 'yellow', 'red') AS Color \r\nFROM \r\n(\r\n SELECT Dest, count() AS Flights, sum(ArrDel15)/Flights*100.0 as DelayPercentage FROM ontime\r\n WHERE toDateTime(FlightDate) >= toDateTime(1577865600) AND toDateTime(FlightDate) <= toDateTime(1609488000) \r\n GROUP BY Dest\r\n) AS o \r\nJOIN airports AS dest ON o.Dest = dest.IATA", "refId": "A", "round": "0s", "showFormattedSQL": true, "skip_comments": true, "table": "ontime" } ], "title": "Airports by Arrivals and % Delay", "type": "geomap" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 4, "w": 5, "x": 0, "y": 5 }, "id": 9, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "/.*/", "values": true }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.2.0-72125", "targets": [ { "add_metadata": true, "database": "default", "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "dateColDataType": "FlightDate", "dateTimeColDataType": "toDateTime(FlightDate)", "dateTimeType": "DATETIME", "editorMode": "builder", "extrapolate": true, "format": "table", "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", "interval": "", "intervalFactor": 1, "query": "SELECT count() FROM $table WHERE $timeFilter", "rawQuery": "/* grafana dashboard=Ontime Database Carrier and Airport Stats, user=1 */\nSELECT count() FROM default.ontime WHERE FlightDate >= toDate(1577865600) AND FlightDate <= toDate(1609488000) AND toDateTime(FlightDate) >= toDateTime(1577865600) AND toDateTime(FlightDate) <= toDateTime(1609488000) and Carrier = '9E'", "refId": "A", "round": "0s", "showFormattedSQL": true, "skip_comments": true, "table": "ontime" } ], "title": "Total Flights for All Carriers", "type": "stat" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "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", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 6, "w": 24, "x": 0, "y": 9 }, "id": 3, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "maxHeight": 600, "mode": "multi", "sort": "none" } }, "targets": [ { "add_metadata": true, "database": "default", "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "dateColDataType": "FlightDate", "dateTimeColDataType": "toDateTime(FlightDate)", "dateTimeType": "DATETIME", "editorMode": "builder", "extrapolate": true, "format": "time_series", "formatAs": "time_series", "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", "interval": "", "intervalFactor": 1, "query": "SELECT $timeSeries as t, Carrier, count() Flights\r\n FROM $table \r\n WHERE $timeFilter \r\n GROUP BY t, Carrier ORDER BY t, Carrier ", "rawQuery": "/* grafana dashboard=Ontime Database Carrier and Airport Stats, user=1 */\nSELECT (intDiv(toUInt32(toDateTime(FlightDate)), 21600) * 21600) * 1000 as t, Carrier, count() Flights\r\n FROM default.ontime \r\n WHERE FlightDate >= toDate(1672560000) AND FlightDate <= toDate(1704095999) AND toDateTime(FlightDate) >= toDateTime(1672560000) AND toDateTime(FlightDate) <= toDateTime(1704095999) \r\n GROUP BY t, Carrier ORDER BY t, Carrier", "refId": "A", "round": "0s", "showFormattedSQL": true, "showHelp": false, "skip_comments": true, "step": "", "table": "ontime" } ], "title": "Number of Flights by All Carriers", "type": "timeseries" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "description": "", "fieldConfig": { "defaults": { "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "scaleDistribution": { "type": "linear" } } }, "overrides": [] }, "gridPos": { "h": 5, "w": 24, "x": 0, "y": 15 }, "hideTimeOverride": true, "id": 14, "options": { "calculate": false, "cellGap": 1, "color": { "exponent": 0.5, "fill": "dark-orange", "mode": "scheme", "reverse": false, "scale": "exponential", "scheme": "PiYG", "steps": 64 }, "exemplars": { "color": "rgba(255,0,255,0.7)" }, "filterValues": { "le": 1e-9 }, "legend": { "show": true }, "rowsFrame": { "layout": "auto" }, "tooltip": { "mode": "single", "showColorScale": false, "yHistogram": false }, "yAxis": { "axisPlacement": "left", "reverse": false } }, "pluginVersion": "11.2.0-72125", "targets": [ { "add_metadata": true, "database": "default", "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "dateColDataType": "FlightDate", "dateLoading": false, "dateTimeColDataType": "toDateTime(FlightDate)", "dateTimeType": "DATETIME", "datetimeLoading": false, "editorMode": "builder", "extrapolate": true, "format": "time_series", "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", "interval": "", "intervalFactor": 1, "query": "SELECT $timeSeries as t, Carrier, sum(Cancelled)/count(*)*100.0 as \"CarrierAverage\"\n FROM $table \n WHERE $timeFilter \n GROUP BY t, Carrier ORDER BY t, Carrier ", "rawQuery": "/* grafana dashboard=Ontime Database Carrier and Airport Stats, user=1 */\nSELECT (intDiv(toUInt32(toDateTime(FlightDate)), 21600) * 21600) * 1000 as t, sum(Cancelled)/count(*)*100.0 as \"Carrier Average\"\n FROM default.ontime \n WHERE Carrier = 'WN'\n AND FlightDate >= toDate(1262332800) AND FlightDate <= toDate(1293868800) AND toDateTime(FlightDate) >= toDateTime(1262332800) AND toDateTime(FlightDate) <= toDateTime(1293868800) \n GROUP BY t ORDER BY t", "refId": "A", "round": "0s", "skip_comments": true, "table": "ontime", "tableLoading": false } ], "title": "Cancelled Flights over Time", "type": "heatmap" }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 20 }, "id": 6, "panels": [], "title": "Flight Statistics for Single Carrier", "type": "row" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 4, "w": 5, "x": 0, "y": 21 }, "id": 8, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "/.*/", "values": true }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.2.0-72125", "targets": [ { "add_metadata": true, "database": "default", "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "dateColDataType": "FlightDate", "dateTimeColDataType": "toDateTime(FlightDate)", "dateTimeType": "DATETIME", "editorMode": "builder", "extrapolate": true, "format": "table", "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", "interval": "", "intervalFactor": 1, "query": "SELECT count() FROM $table WHERE $timeFilter and Carrier = '$carrier'", "rawQuery": "/* grafana dashboard=Ontime Database Carrier and Airport Stats, user=1 */\nSELECT count() FROM default.ontime WHERE FlightDate >= toDate(1577865600) AND FlightDate <= toDate(1718810559) AND toDateTime(FlightDate) >= toDateTime(1577865600) AND toDateTime(FlightDate) <= toDateTime(1718810559)", "refId": "A", "round": "0s", "showFormattedSQL": true, "skip_comments": true, "table": "ontime" } ], "title": "Total Flights for Carrier ${carrier}", "type": "stat" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "#EAB839", "value": 10 }, { "color": "red", "value": 20 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 19, "x": 5, "y": 21 }, "id": 13, "options": { "basemap": { "config": {}, "name": "Layer 0", "type": "default" }, "controls": { "mouseWheelZoom": true, "showAttribution": true, "showDebug": false, "showMeasure": false, "showScale": false, "showZoom": true }, "layers": [ { "config": { "showLegend": true, "style": { "color": { "field": "DelayPercentage", "fixed": "red" }, "opacity": 0.5, "rotation": { "fixed": 0, "max": 360, "min": -360, "mode": "mod" }, "size": { "field": "Flights", "fixed": 5, "max": 15, "min": 2 }, "symbol": { "fixed": "img/icons/marker/circle.svg", "mode": "fixed" }, "symbolAlign": { "horizontal": "center", "vertical": "center" }, "textConfig": { "fontSize": 12, "offsetX": 0, "offsetY": 0, "textAlign": "center", "textBaseline": "middle" } } }, "location": { "mode": "auto" }, "name": "Layer 1", "tooltip": true, "type": "markers" } ], "tooltip": { "mode": "details" }, "view": { "allLayers": true, "id": "north-america", "lat": 40, "lon": -100, "zoom": 4 } }, "pluginVersion": "11.2.0-72125", "targets": [ { "add_metadata": true, "database": "default", "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "dateTimeColDataType": "toDateTime(FlightDate)", "dateTimeType": "DATETIME", "editorMode": "builder", "extrapolate": true, "format": "table", "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", "interval": "", "intervalFactor": 1, "query": "SELECT Dest, Flights, DelayPercentage, dest.Name, dest.Latitude, dest.Longitude \r\nFROM \r\n(\r\n SELECT Dest, count() AS Flights, sum(ArrDel15)/Flights*100.0 as DelayPercentage FROM ontime\r\n WHERE $timeFilter and Carrier = '$carrier'\r\n GROUP BY Dest\r\n) AS o \r\nJOIN airports AS dest ON o.Dest = dest.IATA \r\n", "rawQuery": "/* grafana dashboard=Ontime Database Carrier and Airport Stats, user=1 */\nSELECT Dest, Flights, DelayPercentage, dest.Name, dest.Latitude, dest.Longitude \r\nFROM \r\n(\r\n SELECT Dest, count() AS Flights, sum(ArrDel15)/Flights*100.0 as DelayPercentage FROM ontime\r\n WHERE toDateTime(FlightDate) >= toDateTime(1577865600) AND toDateTime(FlightDate) <= toDateTime(1609488000) \r\n GROUP BY Dest\r\n) AS o \r\nJOIN airports AS dest ON o.Dest = dest.IATA", "refId": "A", "round": "0s", "showFormattedSQL": true, "skip_comments": true, "table": "ontime" } ], "title": "Per Carrier Airports by Arrivals and % Delay", "type": "geomap" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 4, "w": 5, "x": 0, "y": 25 }, "id": 1, "maxDataPoints": 100, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "/.*/", "values": true }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.2.0-72125", "targets": [ { "add_metadata": true, "database": "default", "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "dateTimeType": "DATETIME", "editorMode": "builder", "extrapolate": true, "format": "table", "formatAs": "time_series", "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", "interval": "", "intervalFactor": 1, "query": "SELECT '$carrier'", "rawQuery": "/* grafana dashboard=Ontime Database Carrier and Airport Stats, user=1 */\nSELECT '9E'", "refId": "A", "round": "0s", "showFormattedSQL": true, "showHelp": false, "skip_comments": true, "step": "", "table": "ontime" } ], "title": "Selected Carrier Name", "type": "stat" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 5, "w": 24, "x": 0, "y": 29 }, "hideTimeOverride": true, "id": 5, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "maxHeight": 600, "mode": "multi", "sort": "none" } }, "targets": [ { "database": "default", "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "dateColDataType": "FlightDate", "dateLoading": false, "dateTimeColDataType": "toDateTime(FlightDate)", "dateTimeType": "DATETIME", "datetimeLoading": false, "editorMode": "builder", "extrapolate": true, "format": "time_series", "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", "intervalFactor": 1, "query": "SELECT $timeSeries as t, count(*) Flights \n FROM $table \n WHERE Carrier = '$carrier'\n AND $timeFilter \n GROUP BY t ORDER BY t ", "rawQuery": "SELECT (intDiv(toUInt32(toDateTime(FlightDate)), 21600) * 21600) * 1000 as t, count(*) Flights \n FROM default.ontime \n WHERE Carrier = '9E'\n AND FlightDate >= toDate(1555911848) AND FlightDate <= toDate(1582094648) AND toDateTime(FlightDate) >= toDateTime(1555911848) AND toDateTime(FlightDate) <= toDateTime(1582094648) \n GROUP BY t ORDER BY t", "refId": "A", "round": "0s", "skip_comments": true, "table": "ontime", "tableLoading": false } ], "title": "Number of Flights Operated by Carrier", "type": "timeseries" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 3, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 5, "w": 24, "x": 0, "y": 34 }, "hideTimeOverride": true, "id": 4, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "maxHeight": 600, "mode": "multi", "sort": "none" } }, "targets": [ { "database": "default", "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "dateColDataType": "FlightDate", "dateLoading": false, "dateTimeColDataType": "toDateTime(FlightDate)", "dateTimeType": "DATETIME", "datetimeLoading": false, "editorMode": "builder", "extrapolate": true, "format": "time_series", "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", "intervalFactor": 1, "query": "SELECT $timeSeries as t, sum(ArrDel15)/count(*)*100.0 as \"Carrier Average\"\n FROM $table \n WHERE Carrier = '$carrier'\n AND $timeFilter \n GROUP BY t ORDER BY t ", "rawQuery": "SELECT (intDiv(toUInt32(toDateTime(FlightDate)), 21600) * 21600) * 1000 as t, sum(ArrDel15)/count(*)*100.0 as \"Carrier Average\"\n FROM default.ontime \n WHERE Carrier = '9E'\n AND FlightDate >= toDate(1555911938) AND FlightDate <= toDate(1582094738) AND toDateTime(FlightDate) >= toDateTime(1555911938) AND toDateTime(FlightDate) <= toDateTime(1582094738) \n GROUP BY t ORDER BY t", "refId": "A", "round": "0s", "skip_comments": true, "table": "ontime", "tableLoading": false }, { "database": "default", "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "dateColDataType": "FlightDate", "dateLoading": false, "dateTimeColDataType": "toDateTime(FlightDate)", "dateTimeType": "DATETIME", "datetimeLoading": false, "editorMode": "builder", "extrapolate": true, "format": "time_series", "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", "intervalFactor": 1, "query": "SELECT $timeSeries as t, sum(ArrDel15)/count(*)*100.0 as \"Industry Average\" \n FROM $table \n WHERE $timeFilter \n GROUP BY t ORDER BY t ", "rawQuery": "SELECT (intDiv(toUInt32(toDateTime(FlightDate)), 21600) * 21600) * 1000 as t, sum(ArrDel15)/count(*)*100.0 as \"Industry Average\" \n FROM default.ontime \n WHERE FlightDate >= toDate(1555911938) AND FlightDate <= toDate(1582094738) AND toDateTime(FlightDate) >= toDateTime(1555911938) AND toDateTime(FlightDate) <= toDateTime(1582094738) \n GROUP BY t ORDER BY t", "refId": "B", "round": "0s", "skip_comments": true, "table": "ontime", "tableLoading": false } ], "title": "Percentage of Delayed Arrivals", "type": "timeseries" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 3, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 5, "w": 24, "x": 0, "y": 39 }, "hideTimeOverride": true, "id": 10, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "maxHeight": 600, "mode": "multi", "sort": "none" } }, "targets": [ { "database": "default", "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "dateColDataType": "FlightDate", "dateLoading": false, "dateTimeColDataType": "toDateTime(FlightDate)", "dateTimeType": "DATETIME", "datetimeLoading": false, "editorMode": "builder", "extrapolate": true, "format": "time_series", "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", "intervalFactor": 1, "query": "SELECT $timeSeries as t, sum(Cancelled)/count(*)*100.0 as \"Carrier Average\"\n FROM $table \n WHERE Carrier = '$carrier'\n AND $timeFilter \n GROUP BY t ORDER BY t ", "rawQuery": "SELECT (intDiv(toUInt32(toDateTime(FlightDate)), 21600) * 21600) * 1000 as t, sum(Cancelled)/count(*)*100.0 as \"Carrier Average\"\n FROM default.ontime \n WHERE Carrier = '9E'\n AND FlightDate >= toDate(1555911982) AND FlightDate <= toDate(1582094782) AND toDateTime(FlightDate) >= toDateTime(1555911982) AND toDateTime(FlightDate) <= toDateTime(1582094782) \n GROUP BY t ORDER BY t", "refId": "A", "round": "0s", "skip_comments": true, "table": "ontime", "tableLoading": false }, { "database": "default", "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "dateColDataType": "FlightDate", "dateLoading": false, "dateTimeColDataType": "toDateTime(FlightDate)", "dateTimeType": "DATETIME", "datetimeLoading": false, "editorMode": "builder", "extrapolate": true, "format": "time_series", "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", "intervalFactor": 1, "query": "SELECT $timeSeries as t, sum(Cancelled)/count(*)*100.0 as \"Industry Average\" \n FROM $table \n WHERE $timeFilter \n GROUP BY t ORDER BY t ", "rawQuery": "SELECT (intDiv(toUInt32(toDateTime(FlightDate)), 21600) * 21600) * 1000 as t, sum(Cancelled)/count(*)*100.0 as \"Industry Average\" \n FROM default.ontime \n WHERE FlightDate >= toDate(1555911982) AND FlightDate <= toDate(1582094782) AND toDateTime(FlightDate) >= toDateTime(1555911982) AND toDateTime(FlightDate) <= toDateTime(1582094782) \n GROUP BY t ORDER BY t", "refId": "B", "round": "0s", "skip_comments": true, "table": "ontime", "tableLoading": false } ], "title": "Percentage of Cancelled Flights", "type": "timeseries" } ], "refresh": "", "schemaVersion": 39, "tags": [], "templating": { "list": [ { "current": {}, "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "${DS_GITHUB-DEMO-CLUSTER-ALTINITY}" }, "definition": "select distinct Carrier from default.ontime order by Carrier", "description": "Carrier abbreviation", "hide": 0, "includeAll": false, "label": "Carrier", "multi": false, "name": "carrier", "options": [], "query": "select distinct Carrier from default.ontime order by Carrier", "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" } ] }, "time": { "from": "2020-01-01T05:00:00.000Z", "to": "2020-12-31T05:00:00.000Z" }, "timepicker": {}, "timezone": "", "title": "Ontime Database Carrier and Airport Stats", "uid": "fdp7y24vd66m8d", "version": 3, "weekStart": "" }