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
5
votes
1 answer

How to fetch data from Clickhouse in dicitionary/name-tuple using clickhouse-driver (python)?

When we fetch data using the DB API 2.0 cur.execute("select * from db.table") we get a cursor which seems like a generator object of list of tuples. Whereas in pymongo, when we fetch we get it as list of dictionaries. I wanted to achieve something…
5
votes
0 answers

Clickhouse distributed table node stops accepting TCP connections

Clickhouse version: (version 20.3.9.70 (official build)) (I know this is no longer supported, we have plans to upgrade but it takes time) The Setup We are running three query nodes (nodes with distributed tables only), we spun up the third one…
user358656
  • 101
  • 1
  • 5
5
votes
1 answer

Clickhouse: how to take column's default value when insert data through pandas dataframe and the cell value is null

I am trying to insert a Pandas dataframe into Clickhouse, but encountered some problems. Here is the table schema: CREATE TABLE IF NOT EXISTS test_table ( name String, day DateTime64(3) DEFAULT '2020-07-01 00:00:00', ) engine =…
5
votes
1 answer

Is Clickhouse Buffer Table appropriate for realtime ingestion of many small inserts?

I am writing an application that plots financial data and interacts with a realtime feed of such data. Due to the nature of the task, live market data may be received very frequently in one-trade-at-a-time fashion. I am using the database locally…
WhiteStork
  • 385
  • 1
  • 15
5
votes
0 answers

Clickhouse ASOF JOIN on just one column (Exception: Cannot get JOIN keys from JOIN ON section)

Clickhouse gives me an error when I try to ASOF JOIN on just one column, but not when I add an equality JOIN clause. Why? Example tables: orders: ┌─time─┬─price─┬─id─┐ │ 0 │ 4 │ 3 │ │ 1 │ 4 │ 3 │ │ 2 │ 4 │ 3 │ │ 3 │ 3…
Evan DeCorte
  • 151
  • 1
  • 4
5
votes
3 answers

is there a better way to query system tables across a clickhouse cluster?

We have a modest clickhouse cluster, ~30 nodes, and want to collect usage stats on it. We are hoping to do this using scheduled queries against the system tables, but using a normal query only get information on the one node you happen to be…
Richard Rymer
  • 133
  • 14
5
votes
2 answers

How to insert large amount of data into a ClickHouse DB?

I have an instance of a ClickHouse server running and I have successfully connected to it through a client. I'm using Tabix.io to run my queries. I have created a DB and a table called "names". I want to input a lot of randomly generated names…
DLO
  • 914
  • 1
  • 13
  • 30
5
votes
2 answers

Clickhouse: DB::Exception: Memory limit (for query) exceeded

What should I do when I run out of memory for Clickhouse queries? You can't just crank up the memory, right? There is also a limit to memory, how to configure the hard disk? SELECT UserID, Title FROM ( SELECT L.UserID, …
心沙漠
  • 51
  • 1
  • 1
  • 3
5
votes
2 answers

Command running in kubernetes hangs

I need to run a command in clickhouse database in kubernetes. When I try it with docker it works ok: docker run -it yandex/clickhouse-client -h 172.19.0.1 --database=test --query="SYSTEM RELOAD DICTIONARIES" but when I run it in kub: kubectl run …
ogbofjnr
  • 1,688
  • 5
  • 19
  • 41
5
votes
2 answers

Issue connecting to Dockerized Clickhouse Server with Python driver

I am having an issue connecting to clickhouse in a windows docker container with python's driver. Clickhouse server is running on my E drive in a docker container exposed to port 8123. I can connect easily in R with this package…
LoF10
  • 1,907
  • 1
  • 23
  • 64
5
votes
1 answer

How to show what engine is being in-used of a table in ClickHouse database?

Is there any command / SQL that I can show what engine is being in-used of a table in ClickHouse database? create table t (id UInt16, name String) ENGINE = Memory; insert into t(id, name) values (1, 'abc'), (2, 'xyz'); create table t2 as t ENGINE =…
Panco
  • 351
  • 5
  • 13
5
votes
1 answer

How to know when data has been inserted in clickhouse

I understood that clickhouse is eventually consistent. So once an insert call returns, it doesn't mean that the data will appear in a select query. does that apply to stand-alone clickhouse (no distribution, no replication)? I understand the…
Juh_
  • 14,628
  • 8
  • 59
  • 92
5
votes
1 answer

How to remove the default clickhouse user through users.d

For a clickhouse production server, I would like to secure the access through a defined user, and remove the default user. I'm using a users.d/myuser.xml file to add a new user, and I would like to remove the default user by this means too. I can't…
Stephane
  • 161
  • 2
  • 14
5
votes
1 answer

Updating rows with values from another table in ClickHouse

I have two tables, one with data about counties and another with data about states. Different states can sometimes have counties with the same exact name, so I am trying to populate a unique_name column in my counties table that is the concatenation…
MarcioPorto
  • 555
  • 7
  • 22
5
votes
3 answers

Is there a way to join all arrays in clickhouse column and then filter for duplicates?

I have a clickhouse table with one of it columns being Array(T). When I run SELECT array_field FROM my_table I get the following: 1 | {a, b, c} -------------- 2 | {a, b} -------------- 3 | {d, e} I need to find a way to get a list of unique values…