You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A query executed through the Grafana datasource fails with error: clickhouse: unsupported column type "JSON" but if I run this exact query from the clickhouse client CLI, it works fine.
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
I used the following query:
SELECT timestamp as "time", log FROM "k8s"."dist_pod_logs" WHERE ( time >= $__fromTime AND time <= $__toTime ) ORDER BY time ASC LIMIT 10
My table definition is:
SET allow_experimental_full_text_index = true;
SET allow_experimental_json_type = 1
CREATE TABLE IF NOT EXISTS k8s.pod_logs ON CLUSTER logs
(
timestamp DateTime,
log JSON,
host LowCardinality(String),
pod_name LowCardinality(String),
severity LowCardinality(String),
message String CODEC(ZSTD(1)),
INDEX inv_idx(message) TYPE full_text(0) GRANULARITY 1
)
Engine = MergeTree
ORDER BY tuple(host, pod_name, timestamp)
TTL timestamp + toIntervalDay(8);
CREATE TABLE IF NOT EXISTS k8s.dist_pod_logs ON CLUSTER logs
(
timestamp DateTime,
log JSON,
host LowCardinality(String),
pod_name LowCardinality(String),
severity LowCardinality(String),
message String CODEC(ZSTD(1))
)
ENGINE = Distributed('logs', 'k8s', 'pod_logs', rand());
Anything else we need to know?:
Environment:*
Grafana version: Grafana v10.3.3
Plugin version: 4.4.0
OS Grafana is installed on: Kubernetes (1.29) / AWS Linux
User OS & Browser: Linux / Chrome
Clickhouse version: 24.9.2
Others:
Does the behavior got resolved on 4.5.0?, I couldn't find any references to it
The text was updated successfully, but these errors were encountered:
The new experimental JSON type is not yet supported in the Go driver, and therefore not supported in the plugin
You can work around this by casting the entire JSON column from JSON to String (SELECT log::String), or by casting the individual field from Dynamic to whatever type the underlying field is known to be (SELECT log.some_field::Int64)
We are working to update both the Go driver and Grafana plugin to support these new types. I'll close this for now since it's not a bug.
What happened:
A query executed through the Grafana datasource fails with error:
clickhouse: unsupported column type "JSON"
but if I run this exact query from the clickhouse client CLI, it works fine.What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
I used the following query:
SELECT timestamp as "time", log FROM "k8s"."dist_pod_logs" WHERE ( time >= $__fromTime AND time <= $__toTime ) ORDER BY time ASC LIMIT 10
My table definition is:
Anything else we need to know?:
Environment:*
Does the behavior got resolved on
4.5.0
?, I couldn't find any references to itThe text was updated successfully, but these errors were encountered: