Hi <@U01HPVB0D2S> / <@U01NT95GV8B> / <@U03BTNACHNX...
# support
a
Hi @Pranay / @Srikanth Chekuri / @nitya-signoz We are using multiple dashboards on v0.45 and prefer writing queries in ClickHouse. However, with frequent SigNoz upgrades, we’ve noticed that table versions and column names keep changing. Is there any way to automatically migrate or adapt the queries in existing dashboards to reflect these changes?
s
Hi @Alok Singh, We encourage you to use the query builder so the evolving schema doesn't directly affect you. If there is something about the lack of query builder functionality please bring it up to our attention and we will try to solve it. There is no automated way to update manual CH queries today.
a
Hi @Srikanth Chekuri, In starting, I tried with query builder, but it has some limitations, for example: I want to create a dashboard for exception, but I am not able to choose the proper exception table in traces, it always triggers the index table.
I am giving few query example, can you please help me to use query builder Example 1: select name as ApiName,serviceName as Product, count(1) as Total_Hits,COUNTIf(durationNano <= 5000000000) AS "0 Sec to 5 Sec",COUNTIf(durationNano > 5000000000 and durationNano <= 10000000000) AS "6 Sec to 10 Sec",COUNTIf(durationNano > 10000000000 and durationNano <= 20000000000) AS "11 Sec to 20 Sec",COUNTIf(durationNano > 20000000000 and durationNano <= 30000000000) AS "21 Sec to 30 Sec",COUNTIf(durationNano > 30000000000) AS "More Than 30 Sec" FROM signoz_traces.durationSort where name like '/%' and serviceName = {{.service_name}} and timestamp >= {{.start_timestamp}} and timestamp <= {{.end_timestamp}} group by name,serviceName Example 2: SELECT groupID,count() AS exceptionCount, any(exceptionType) as exceptionType FROM signoz_traces.distributed_signoz_error_index_v2 WHERE serviceName = {{.service_name}} and timestamp >= toDateTime({{.start_timestamp}}) and timestamp <= toDateTime({{.end_timestamp}}) GROUP BY groupID,serviceName
s
For exceptions, you need to use ClickHouse queries only.