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

Collapsing overlapping time intervals using ClickHouse

I read similar questions and it's possible to make it work by using window functions, however, since ClickHouse does not seem to support them I'm seeking for an alternative solution. Given the time intervals like (1, 5), (2, 3), (3, 8), (10, 15) I…
Vyacheslav
  • 1,186
  • 2
  • 15
  • 29
3
votes
2 answers

Django model reference to a postgres foreign table (clickhouse_fdw)

I have a Django project. I've connected a clickhouse table with a postgres table using clickhouse_fdw. Following clickhouse_fdw instructions, in postgres I did: CREATE EXTENSION clickhousedb_fdw; CREATE SERVER clickhouse_svr FOREIGN DATA WRAPPER…
3
votes
0 answers

Is there a python function for spatio-temporal clustering?

I'm working with a dataset with latitude, longitude and date-time, and 5 million points per day. And I don't have an expected number of cluster, and depending on the day it should change. I'm coding in Python, with a clickhouse database to store the…
Stephane
  • 161
  • 2
  • 14
3
votes
1 answer

Using comparison operators in ON clause

Cannot use comparison operators in ON clause? [How to reproduce] ClickHouse server version : v19.11.0 Example with two tables table1 CREATE TABLE table1 ( str1 String, num1 UInt64 ) ENGINE=MergeTree() ORDER BY (str1); table2 CREATE TABLE…
3
votes
4 answers

Clickhouse does not return column headers

I'm trying to get some relational data from clickhouse and play with in in pandas. It works, but pd.read_sql_query returns dataframe, where column names are the values of the first row. Instead I expected to see columns names as they named in…
user1443993
  • 371
  • 4
  • 10
3
votes
1 answer

Missing instruction `_mm_crc32_u64` when installing clickhouse-cityhash on OSX 10.14.5

I am attempting to install clickhouse-cityhash with pip on OSX 10.14.5 but it fails with the following (abridged) output: src/city.cc:396:5: error: use of undeclared identifier '_mm_crc32_u64' CHUNK(1, 1); CHUNK(k0, 0); ^ ... fatal error:…
Darragh Enright
  • 13,676
  • 7
  • 41
  • 48
3
votes
1 answer

Why clickhouse have both WHERE and PREWHERE constructs?

I'm reading the documentation and just curious about next: PREWHERE is like an optimized form of WHERE, which reads only necessary data before filtering and then with this information reads all of the actual data for the user. The question is why…
the_kaba
  • 1,457
  • 2
  • 14
  • 31
3
votes
1 answer

Is it possible to update primary key in clickhouse using MergeTree engine?

I'm trying to update primary key in simple table. When i execute the query like this: alter table test update id = 2 where id = 1; I see the message: Cannot UPDATE key column `id` Is there any workarounds about this?
the_kaba
  • 1,457
  • 2
  • 14
  • 31
3
votes
2 answers

Can't connect from outside of container to Clickhouse by HTTP on Mac OS

I'm trying to use ClickHouse with docker on Mac OS. I use next command: docker run -d -p 8123:8123 --rm --name some-clickhouse-server -v /my/config/path/config.xml:/etc/clickhouse-server/config.xml --ulimit nofile=262144:262144…
Andrei Koch
  • 898
  • 1
  • 7
  • 23
3
votes
2 answers

clickhouse dateTime with milliseconds

ClickHouse doesn't support, yet, DateTime with milliseconds. I saw two possible suggestion regarding fields like: 2019-03-17T14:00:32.296Z multiply by 100 an store it in UInt32/64. How do I use the multiply by 100 and store as UInt32? to store…
Arnon Rodman
  • 511
  • 2
  • 6
  • 21
3
votes
2 answers

Can I use clickhouse as key-value storage?

Is it possible to use clickhouse as key-value storage, were data is regularly overwritten, but rarely read? What engine should I use if this is possible?
Stepan Yakovenko
  • 8,670
  • 28
  • 113
  • 206
3
votes
1 answer

Transfer data from clickhouse to PostgreSQL running on different machines

My clickhouse db runs on some_ip:8122 clickhouse db: create table chtable ( val_1 UInt32, val_2 UInt32, val_date_full DateTime, val_id UInt64, val_date_short Date ) engine =…
techkuz
  • 3,608
  • 5
  • 34
  • 62
3
votes
3 answers

How to insert data to Clickhouse from file by HTTP-interface?

I want to insert data to ClickHouse per HTTP-interface from file. CSV, JSON, TabSeparated, it's doesn't matters. Or insert data to Docker-container uses yandex/clickhouse-server. Using HTTP-interface, for example: cat source.csv | curl…
frops
  • 2,196
  • 4
  • 29
  • 42
3
votes
2 answers

Clickhouse: split output on select

Performing a select on Clickhouse, on a MergeTree table that is loaded from a KafkaEngine table via a Materialized View, a simple select shows output split in groups in the clickhouse-client: :) select * from customersVisitors; SELECT * FROM…
xmar
  • 1,729
  • 20
  • 48
3
votes
2 answers

Couldn't parse csv file if value contains from '

Here is demo DDL: CREATE TABLE X ( eventdate Date default toDate(now()), f1 String, f2 String, f3 String ) ENGINE = MergeTree(eventdate, (f1, f2, f3), 8192) When I try to import data,…
slesh
  • 1,902
  • 1
  • 18
  • 29