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
0 answers

PrepareContext error: cannot get table name from query - SQL statement works fine in something like datagrip

So I'm trying to run the following query against a clickhouse db using a go echo api. SELECT (SELECT round(sum(amount),2) FROM activity WHERE created_at >= FROM_UNIXTIME(?) AND created_at <= FROM_UNIXTIME(?) …
liam2682
  • 41
  • 2
3
votes
1 answer

What is the difference between materialized view in clickhouse and postgres

I'm new to Clickhouse, and I was trying to use its materialized view feature. However, it seems that there are significant differences between Clickhouse's and Postgres' materialized views.
3
votes
1 answer

Clickhouse server cpu and memory keep growing even when there is no query running

I am facing a problem that the cpu and memory usage of clickhouse server process keep growing even when there is no query running. The memory useage keeps growing the to the max usage in config.xml, and then drops to a low level, growing to the…
Don Zhang
  • 31
  • 1
3
votes
0 answers

How to find all possible paths in Clickhouse?

If I have a setup similar to this in Clickhouse: CREATE TABLE IF NOT EXISTS nodes ( id UInt64, from String, to String ) ENGINE = MergeTree() PRIMARY KEY id; INSERT INTO nodes (id, from, to) VALUES (1, 'a', 'b'), (2, 'a',…
gs8282
  • 31
  • 2
3
votes
1 answer

what is difference between MaterializedPostgreSQL Engine and PostgreSQL Engine in Clickhouse?

why we need this? since the docs say: MaterializedPostgreSQL Creates a ClickHouse database with tables from PostgreSQL database. PostgreSQL Allows to connect to databases on a remote PostgreSQL server. I cannot see clearly the difference between…
Hiep Tran
  • 3,735
  • 1
  • 21
  • 29
3
votes
1 answer

ClickHouse Join table on cluster

We have a ClickHouse cluster with 2 replicas and 1 shard and we have a join table on that cluster: create table joinTable on cluster 'mycluster' ( a String, b String ) engine = Join(ALL, INNER, a); When we insert data to the table it goes…
ebl
  • 115
  • 1
  • 9
3
votes
0 answers

Clickhouse Exception: Memory limit (total) exceeded

Attempting to connect Clickhouse to replicate data from PostgreSQL using https://clickhouse.com/docs/en/engines/database-engines/materialized-postgresql/. Any ideas on how to solve the error or what's the best way to replicate PostgreSQL data to…
Steve
  • 4,946
  • 12
  • 45
  • 62
3
votes
1 answer

Exception: Pulsar error: IncompatibleSchema

I am new to Pulsar and I am just exploring the functionalities for a new project. I am trying a very basic example to send data from a producer based on schema. To give some background, my idea is to send the data from apache-pulsar to Clickhouse…
3
votes
1 answer

Computed or generated column in Clickhouse

Is there any option how to create a computed column in the CREATE TABLE statement? Something like generated column in PostgreSQL CREATE TABLE people ( ..., height_cm numeric, height_in numeric GENERATED ALWAYS AS (height_cm / 2.54)…
y0j0
  • 3,369
  • 5
  • 31
  • 52
3
votes
2 answers

Clickhouse: Should i optimize MergeTree table manually?

I have a table like: create table test (id String, timestamp DateTime, somestring String) ENGINE = MergeTree ORDER BY (id, timestamp) i inserted 100 records then inserted another 100 records and i run select query select * from test clickhouse…
sinkyminky
  • 73
  • 5
3
votes
1 answer

Is there any way to specify clickhouse-client timeout?

I'm inserting a lot of CSV's into Clickhouse database. Sometimes it stucks on one of the files or something is wrong with the remote server I'm inserting to so it waits default amount of time and then outputs that Code: 209. DB::NetException:…
Arzybek
  • 547
  • 2
  • 6
  • 27
3
votes
1 answer

Multi Tenancy in ClickHouse

A lot of people don't want to use ClickHouse just to do analytics for their company or project. They want to use it as the backbone for SaaS data/analytics projects. Which most of the time would require supporting semi-structured json data, which…
3
votes
1 answer

Environment variables in clickhouse config

Can we define separate parts of some tag in clickhouse config with environment variables? For example we can use: then all the value comes from env variable. But can we use something like this: ENGINE = MergeTree…
Ann Z
  • 33
  • 4
3
votes
4 answers

Selecting specific rows from a table, using a group by query

I have a table which looks something like this: +------------+------------+--------------+ | Date | Name | Certificates | +------------+------------+--------------+ | 2021-02-01 | Jason | 3 | | 2021-02-01 | Nisha | 4…
Shaikh Abuzar
  • 101
  • 1
  • 9
3
votes
2 answers

Clickhouse Memory Issue

I am having a table with around 2 billion rows that i try to query the max(id) from. Id is not the sort key of the table and the table is using the table engine mergeTree. No matter what I try, I get memory errors. This does not stop with this one…
Thomas Miller
  • 79
  • 2
  • 8