grafana + clickhouse模板变量使用all

在使用dashboard的模板变量时,选择all时,如下clickhouse查询语句查询,无法解析正确执行:

sql 复制代码
SELECT orderId,OrderJsonStr FROM xdatabase."xxxx_table" WHERE   ( createTime  >= $__fromTime AND createTime <= $__toTime )  AND orderId IN (${orderId}) ORDER BY orderId DESC LIMIT 300

优化为:

sql 复制代码
SELECT orderId,OrderJsonStr FROM xdatabase."xxxx_table" WHERE   ( createTime  >= $__fromTime AND createTime <= $__toTime )  AND $__conditionalAll(orderId IN (${orderId:singlequote}), $orderId) ORDER BY orderId DESC LIMIT 300

可正常执行,选择all时语句变为 1=1

参考

ClickHouse Plugin for Grafana - 2.0 Release

相关推荐
Deamon Tree2 小时前
Prometheus和Grafana简介
grafana·prometheus
码界奇点20 小时前
Apache IoTDB 架构特性与 PrometheusGrafana 监控体系部署实践
架构·apache·grafana·prometheus·iotdb
Linux-palpitate1 天前
基于Prometheus和Grafana的MySQL监控,服务器监控
服务器·grafana·prometheus
yiqian19893 天前
grafana做状态变化的监控图表
grafana
angushine3 天前
Docker方式安装Prometheus+Grafana+Node Exporter
docker·grafana·prometheus
songroom3 天前
dbpystream webapi: 一次clickhouse数据从系统盘迁至数据盘的尝试
后端·clickhouse·阿里云
时空无限4 天前
grafana dashboard 监控 json 文件 uid 长度限制
grafana
weixin_307779134 天前
Linux 下 Docker 与 ClickHouse 的安装配置及 MySQL 数据同步指南
linux·数据库·mysql·clickhouse·运维开发
q9085447035 天前
Prometheus+Grafana 智能监控告警系统(服务器指标采集、mysql指标采集)
服务器·grafana·prometheus
bigdata-rookie5 天前
ClickHouse 介绍
clickhouse