2,220 questions
Best practices
0
votes
1
replies
25
views
ClickHouse ORDER BY: Is it correct to put a high-cardinality column first?
In ClickHouse MergeTree tables, ORDER BY defines physical data layout and the sparse primary index is built on granule boundaries.
From an internals perspective, ORDER BY should be chosen based on ...
1
vote
0
answers
46
views
Grafana Foundation Go SDK: Is it possible to add raw / plugin datasource queries (e.g. ClickHouse) to dashboards?
I’m experimenting with Grafana Foundation SDK (Go) to define dashboards as code.
I can successfully create dashboards and panels using the builder APIs (e.g. dashboard.NewDashboardBuilder, stat....
Tooling
0
votes
2
replies
49
views
Where to download the correct Flink ClickHouse Connector JAR for Flink 1.18
I am running Flink 1.18 (Standalone/Docker) using PyFlink and I’m trying to sink data from Pulsar to ClickHouse using the Table API.
I initially tried the standard generic JDBC connector, but I ran ...
0
votes
1
answer
113
views
Clickhouse conditional column selection
I am working on a dashboard in Grafana with 2 different datasources which can be selected using a dashboard variable. Both datasources contain the same table (let's call it table1 for now), however, ...
0
votes
1
answer
45
views
AggregatingMergeTree in ClickHouse. Can I transfer state of function to another table?
I wish to calculate some methrics by time granulations. So, I have a table of facts (user actions), then I calculate into AggregatingMergeTree for each day. What I want is to take state of uniqState ...
1
vote
1
answer
115
views
Why does the triggering feature not support exceptions when using Kafka engine tables
I have subscribed to a Kafka cluster A with some Kafka engine tables before, and they are working normally. I have created a new Kafka cluster now, but after subscribing to the topics of the new ...
-1
votes
1
answer
58
views
Get result from distributed table joined with local tables on every shard [closed]
I have clickhouse cluster with distributed tables sharded by Id. I need to select data from distributed table 'A_distributed' that is joined locally with 'B_local' tables on Id and then given result ...
0
votes
1
answer
126
views
Connection check failed: Error: Client network socket disconnected before secure TLS connection was established from Clichouse cloud service
Connection check failed: Error: Client network socket disconnected before secure TLS connection was established
Environment:
ClickHouse Cloud Service
Issue:
When trying to connect my application to ...
0
votes
0
answers
111
views
Constantly getting a connection reset error when connecting to ClickHouse from Spark
Following the Spark Native Connector in ClickHouse, I downloaded clickhouse-spark-runtime-3.5.2_0.8.0 and clickhouse-jdbc-all-0.9.2, and set the catalog configured to:
The correct username and ...
0
votes
1
answer
86
views
Normalize JSON array in Clickhouse
I have a Clickhouse table with following structure:
id
json
111
[{"productId": "718f4d00-210d-43f1-9c9c-e97733d38972", "cost": "170.00000"}, {"productId&...
0
votes
0
answers
49
views
Why is total row count of a table built by dbt core in click house less than it is suppose to be and is inconsistent every time the dbt model is run?
I am building dbt models to create or full refresh table in clickhouse. I don't specify engine so it assumes replacing merge tree as a default engine. I have mentioned 'materialized: table' in ...
0
votes
0
answers
98
views
Clickhouse - Aggregate ReplacingMergeTree table using incremental view
I have the following table (simplified):
CREATE TABLE source
(
client_id Int32,
site_id Int32,
date Date32,
visitors Int64,
_peerdb_synced_at ...
0
votes
0
answers
110
views
Inconsistent result based on refreshable materialized view
I got distributed database with refreshable materialized view. Selecting from target distributed table do not gave me all data, also it gives inconsistent results, I think because of refreshable ...
0
votes
1
answer
65
views
Right way to calculate field based on other aggregating fields in clickhouse [closed]
I got this source table
id
A
B
aaa
0
1
aaa
0
1
aaa
1
0
bbb
0
1
I need to get this table
id
A
B
C
aaa
1
2
1
bbb
0
1
0
where C is calculated based in rule (A > 0 and B >= 2). So to calculate C I ...
0
votes
1
answer
31
views
Alternatives to multiSearchAnyCaseInsensitive for huge needles array in clickhouse
I got array of words roughly 10k in size. I need to check text column of rows if there is any of this words in the text. I decided to use multiSearchAnyCaseInsensitive:
AS WITH (select groupArray(word)...