Questions tagged [clickhouse]

ClickHouse is an open-source column-oriented DBMS for real time analytical reporting which has Capability to store and process petabytes of data.

ClickHouse is an open-source column-oriented database management system that allows generating analytical data reports in real time.

1835 questions
9
votes
1 answer

DBeaver - Clickhouse - SQL Error [159] .. Read timed out

I'm getting "Read timed out" when running a query on a 1,3b row db. It is not a particular advanced query that groups together hashtags in tweets: SELECT case when match(hashtag, …
questionmark
  • 147
  • 1
  • 2
  • 5
9
votes
4 answers

Code: 210. DB::NetException: Connection refused (localhost:9000)

unable to connect to the client,following is the error root@abcC:~# clickhouse-server client ClickHouse client version 20.1.4.14 (official build). Connecting to localhost:9000 as user default. **Code: 210. DB::NetException: Connection refused…
Aneesh Babu
  • 91
  • 1
  • 2
  • 4
9
votes
2 answers

Insert all rows from one table to another of identical structure

I'm trying to move all contents of table to another table with the same structure. There are many rows, so when I try to execute it like this insert into target_table select * from source_table; I get this kind of error: ClickHouse exception, code:…
Andrew
  • 123
  • 1
  • 1
  • 6
9
votes
2 answers

How to kill a process (query) in ClickHouse

Is there any way to kill an idle query in ClickHouse? I have an OPTIMIZE query that will never be completed (as it is running against a ReplicatedMergeTree table) blocking a table that I need to delete.
DamnWidget
  • 1,397
  • 2
  • 10
  • 16
9
votes
2 answers

Import JSON into ClickHouse

I create table with this statement: CREATE TABLE event( date Date, src UInt8, channel UInt8, deviceTypeId UInt8, projectId UInt64, shows UInt32, clicks UInt32, spent Float64 ) ENGINE = MergeTree(date, (date, src,…
Vers_us
  • 193
  • 1
  • 2
  • 9
8
votes
4 answers

Unable to install ClickHouse in MacOS due to CANNOT_OPEN_FILE

While trying to install ClickHouse in a macOS Catalina, doing the following command: ➜ ~ curl -O 'https://builds.clickhouse.tech/master/macos/clickhouse' && chmod a+x ./clickhouse After trying to execute sudo ./clickhouse install it will complain…
czr_RR
  • 541
  • 5
  • 16
8
votes
2 answers

How to understand part and partition of ClickHouse?

I see that clickhouse created multiple directories for each partition key. Documentation says the directory name format is: partition name, minimum number of data block, maximum number of data block and chunk level. For example, the directory name…
GOGO
  • 619
  • 2
  • 7
  • 17
8
votes
1 answer

Can I query per hour increment of a accumulation column in clickhouse?

I want to save event time and the total amount of generated electric per 30 seconds. The total amount is not reseted to zero everytime. It's just the total from the meter first started to now, not total amount generated in the 30 seconds. Is there…
xiemeilong
  • 643
  • 1
  • 6
  • 21
8
votes
3 answers

How to search the string in query with case insensitive on Clickhouse database?

I am developing site using PHP and backend ClickHouse database. When i using like queries , it is not supporting case-sensitive words. select id,comments from discussion where comments LIKE "%Data not reflect%"; Is there any way to search…
selvan
  • 1,183
  • 3
  • 16
  • 24
8
votes
1 answer

Connect to remote clickhouse db via clickhouse command line

When I try to connect to remote clickhouse db via clickhouse command line: $ clickhouse-client -h some_ip.com --port 8123 -u some_user --password some_password -d some_db I get: ClickHouse client version 18.12.17. Connecting to database some_db…
techkuz
  • 3,608
  • 5
  • 34
  • 62
8
votes
0 answers

ClickHouse spring jpa hibernate support

I am using Spring JPA with hibernate ORM project and want to integrate with ClickHouse. I found some references of ClickHouse JDBC which is working ClickHouseJDBCDemo ClickHouseJDBCDemo but was keen to know if there any better way to interact with…
Shiva Achari
  • 955
  • 1
  • 9
  • 18
8
votes
2 answers

Inserting String Array through CSV format in ClickHouse db

I have a simple table: CREATE TABLE t1 ( v1 Int32, a1 Array(Int32), s2 Array(String) ) ENGINE = Memory but can't figure out how to insert String array: insert into t1 format CSV 1,"[1,2]","[a1,a2]" fails with the following…
Kirill Solokhov
  • 400
  • 4
  • 16
7
votes
3 answers

Error running ClickHouse Docker on MacBook M1

I'm running ClickHouse Docker image on MacBook M1 and getting the following error. clickhouse-02_1 | runtime: failed to create new OS thread (have 2 already; errno=22) clickhouse-02_1 | fatal error: newosproc clickhouse-02_1 | …
ASHMIL
  • 521
  • 1
  • 7
  • 23
7
votes
2 answers

Is it possible to change a table engine of an existed clickhouse table?

Is it possible to alter a table engine in clickhouse table like in MySQL, something like this: CREATE TABLE example_table (id UInt32, data String) ENGINE=MergeTree() ORDER BY id; ALTER example_table ENGINE=SummingMergeTree(); Because I didn't find…
Kirill Liubun
  • 1,965
  • 1
  • 17
  • 35
7
votes
2 answers

Consuming nested JSON message from Kafka with ClickHouse

Clickhouse can definitely read JSON messages from Kafka if they are flat JSON documents. We indicate this with kafka_format = 'JSONEachRow' in Clickhouse. This is the way we currently using it: CREATE TABLE topic1_kafka ( ts Int64, event…
ramazan polat
  • 7,111
  • 1
  • 48
  • 76