Altinity / clickhouse-grafana

Altinity Grafana datasource plugin for ClickHouse®
MIT License
713 stars 120 forks source link

Broken table with specific query in 3.0.0 #533

Closed danipozo closed 4 months ago

danipozo commented 5 months ago

The following query:

SELECT
  level,
  ngramSimHash(message_format_string) as format_hash,
  arrayJoin(groupArraySample(${nsamples})(message)) as message
FROM merge(system, 'text_log*') 
WHERE ( 
  event_time >= $from 
    AND 
  event_time <= $to )
GROUP BY level, message_format_string LIMIT 1000

renders a broken table: image I cannot get rid of the "Time" column even if I set "Format as" to "Table" (and also I have other tables working fine without that setting). I haven't been able to reproduce this in any other way or find out what about this query is breaking the frontend. Feel free to ask for logs or anything that may be useful to debug.

Another failure mode. This query:

SELECT
  event_time,
  level,
  ngramSimHash(message_format_string) as format_hash,
  arrayJoin(groupArraySample(${nsamples})(message)) as message
FROM merge(system, 'text_log*') tl
WHERE ( 
  event_time >= $from 
    AND 
  event_time <= $to )
GROUP BY 1, level, message_format_string LIMIT 1000

renders as: image

Slach commented 5 months ago

Could you try the same queries in latest 2.x plugin version and share screenshots?

danipozo commented 5 months ago

It works correctly in 2.5.4 setting "Format as" to table: image

Slach commented 5 months ago

could be duplicated with https://github.com/Altinity/clickhouse-grafana/issues/515 will try to reproduce with master branch locally

danipozo commented 4 months ago

could be duplicated with #515 will try to reproduce with master branch locally

It seems to be working in master in my own local tests. Just to know, when is a minor release expected?

Slach commented 4 months ago

It seems to be working in master in my own local tests. Just to know, when is a minor release expected?

soon as possible

danipozo commented 4 months ago

soon as possible

Thanks! Closing this issue since it is fixed in the pre-releases.