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
3
votes
3 answers

Relational/time series databases and very large SELECT queries

I need to store a large number of structured records (potentially hundreds of billions) in a database. Data would be written continuously by many sensors, with a high insert rate (up to 100k rows/second). The data being well structured, it seems to…
Ben
  • 317
  • 3
  • 12
3
votes
2 answers

It is possible to create flat array from query results in clickhouse?

Query select * from ( select [1] a union all select [1,2] a union all select [2] a ) q; Result (3 rows) [1] [1,2] [2] Expected result (1 row) [1,1,2,2] It is possible ?
cetver
  • 11,279
  • 5
  • 36
  • 56
3
votes
1 answer

Is there any way to create UDF for clickhouse?

In answer to a github ticket regarding UDF of clickhouse, they answered in 2017 that UDF can't be created in clickhouse. I want to know Is there any way to do it now in 2020?
MAYANK BHARTI
  • 73
  • 2
  • 11
3
votes
1 answer

Clickhouse - is it possible to Alter table in a cluster in 1 command

I have a scenario where we need to add columns on a table which exists in several different Clickhouse nodes and queried by a distributed table . Is there a way to alter that table in all servers, using a single alter command? meaning that the…
roee zi
  • 131
  • 3
  • 13
3
votes
2 answers

Is there a way to pretty print SELECT query result in ClickHouse?

Alternative in ClickHouse Select query to pretty print like in MySQL vertically. For example - SELECT * from table \g; I found this resource but its just text https://clickhouse-docs.readthedocs.io/en/latest/formats/vertical.html With --multiline…
Divyanshu Jimmy
  • 2,542
  • 5
  • 32
  • 48
3
votes
2 answers

Condition on UInt64 field in WHERE clause in ClickHouse

In ClickHouse Playground dataset conditions on UInt64 fields don't seem to work. For example query: SELECT * FROM hits_100m_obfuscated where WatchID = 8120543446287443000 doesn't return anything (even though I copied the ID from the dataset). Same…
leftjab
  • 53
  • 5
3
votes
2 answers

Clickhouse : import data having double quotes escaped by backslash

I am trying to import a html snippet which is part of one of the column in csv. There are double quotes in the html snippet and its is escaped. this csv is created using apache spark. for illustrating the issue i have just created 2 columns with…
Shivakumar ss
  • 653
  • 7
  • 19
3
votes
0 answers

Clickhouse - TTL vs ALTER DELETE

I'd like to understand if the data removal mechanism used by the Clickhouse TTL feature is the same as for the ALTER DELETE mutation. In particular, is the following statement (documentation) referring the ALTER DELETE mutation also valid for the…
makasprzak
  • 5,082
  • 3
  • 30
  • 49
3
votes
2 answers

clickhouse-client get error "Timeout exceeded while reading from socket"

I'm newbie to clickhouse, I'm trying to create a clickhouse database on my unbuntu 18.04 remote server, I follow instruction to install click house from DEB package in this link:…
Tấn Phát
  • 33
  • 1
  • 3
3
votes
1 answer

how to do select into table with clickhouse?

I'm new to Clickhouse but I recall SQL having select into capabilities. SELECT column1, column2, column3, ... INTO newtable FROM oldtable WHERE condition; What is the Clickhouse way to do that ?
Peter Moore
  • 1,632
  • 1
  • 17
  • 31
3
votes
4 answers

SQL query to 'collapse' rows which are close together

We have an application that captures searches that are made by users. Because of the nature of our search (we serve results after a few characters) and the speed in which people type, we are getting a log entry for every search/letter. This looks…
unicorn80
  • 1,107
  • 2
  • 9
  • 15
3
votes
1 answer

clickhouse + sqlalchemy: SELECT drops two rows from result

When doing SELECT * FROM test_table; inside clickhouse-client I get N rows as expected, but only N-2 when doing engine.execute('SELECT * FROM test_table;') from python code that uses sqlalchemy. Steps to reproduce: clickhouse-server is running on…
sanyassh
  • 8,100
  • 13
  • 36
  • 70
3
votes
2 answers

Streaming event data with dynamically changing schema into ClickHouse

I am evaluating Clickhouse for storing streaming events having variable event schema. The event schema is nested JSON. The new properties could be of different data types, so we cannot create a normalized key-value pair. Based on the documentation,…
KVK
  • 129
  • 2
  • 11
3
votes
1 answer

Collecting distinct key value-pairs of Nested type in ClickHouse into arrays

I have data with the following schema in ClickHouse: CREATE TABLE table AS ( key String, … nested Nested ( key String, value String ) ) … Some example data: key | … | nested …
salient
  • 2,316
  • 6
  • 28
  • 43
3
votes
1 answer

Populating a Materialized View in ClickHouse exceeds Memory limit

I'm trying to create a materialized view using the ReplicatedAggregatingMergeTree engine on a table that uses a ReplicatedMergeTree engine. After a few million rows I get DB::Exception: Memory limit (for query) exceeded. Is there way to work around…
Michael Böckling
  • 7,341
  • 6
  • 55
  • 76