clickhouse Questions
2
I have a df as a result of a sql query, rows are as follows:
UserID: <class 'uuid.UUID'> 6f6e526c-acd8-496f-88e0-6bfdd594e2c2
ObjectID: <class 'int'> 6095016
ObjectClass: <class 'str...
Antigen asked 18/8, 2021 at 10:26
5
Solved
In clickhouse table I have multiple rows for one _id. What I want is to get only one row for each _id where column _status_set_at has its max value.
That's what I am currently at:
SELECT _id, max...
Drunkometer asked 16/8, 2018 at 13:51
3
General Task
A table consists of three columns (time, key, value). The task is to calculate a running difference for each key.
So, from input
---------------
| time | key | value |
--------------...
Germanophobe asked 15/8, 2018 at 9:43
1
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-a...
Chiefly asked 11/9, 2021 at 22:2
1
Solved
I have a table in Clickhouse, table1, with columns A and B. I want to alter this table to have a new column C. For the purpose of default values (future data will have a different approach) I want ...
Apgar asked 15/9, 2021 at 15:46
2
Solved
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 g...
Tourane asked 30/7, 2021 at 13:58
2
Solved
I have following setup:
CREATE TABLE IF NOT EXISTS request_income_buffer (
timestamp UInt64,
timestamp_micro Float32,
traceId Int64,
host String,
type String,
service String,
message String...
Confidante asked 31/5, 2018 at 10:46
2
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
...
Trescott asked 16/12, 2020 at 3:30
1
I need to execute subquery with argument from main query. But when I can try to execute:
SELECT
(
SELECT time
FROM changes ch2
WHERE ch2.trackable_id = ch.trackable_id AND ch.action = 'create'...
Riviera asked 14/7, 2021 at 11:48
2
Solved
What is the proper way to query top N rows by group in ClickHouse?
Lets take an example of tbl having id2, id4, v3 columns and N=2.
I tried the following
SELECT
id2,
id4,
v3 AS v3
FROM tbl
...
Tetrabrach asked 26/2, 2019 at 14:34
3
Solved
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 ...
Implicate asked 30/4, 2021 at 22:2
2
Solved
Our clickhouse server had several exceptions when running small queries under a peak load:
DB::Exception: Too much simultaneous queries. Maximum: 100
Is there a setting to increase this number ...
Fatuitous asked 26/3, 2017 at 18:49
4
Row_number () is not supported by clickhouse database, looking for a alternate function.
SELECT company_name AS company,
DOMAIN,
city_name AS city,
state_province_code AS state,
country_code ...
Measles asked 13/12, 2018 at 8:5
2
Solved
Clickhouse: is there any way to drop multi-partition in one `alter table drop partition ****` query?
In clickhouse, the table is partitioned by day. Now I want to drop multi-partition in one alter query for convenience.
I've done this by shell using while loop:
while [[ $startDate < $endDate ...
Choreography asked 25/3, 2019 at 2:40
4
I am trying to insert a Pandas dataframe into Clickhouse.
This is my code
import pandas
import sqlalchemy as sa
uri = 'clickhouse://default:@localhost/default'
ch_db = sa.create_engine(uri)
pdf...
Koziarz asked 16/10, 2019 at 21:49
2
I want a column to have a unique value in every insertion. In SQL we can have this using autoincrement, in Clickhouse can we have this functionality using any type like auto increment or any other?...
Amando asked 16/10, 2018 at 4:25
5
Solved
I have an event table (MergeTree) in clickhouse and want to run a lot of small inserts at the same time. However the server becomes overloaded and unresponsive. Moreover, some of the inserts are lo...
Superaltar asked 14/11, 2016 at 15:13
2
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&...
Bloodstain asked 21/12, 2020 at 10:13
2
I'm very new to Clickhouse and my first attempts seem to always generate this kind of output for SELECT:
:) select * from test
SELECT *
FROM test
┌─s───┬───i─┐
│ foo │ 123 │
└─────┴─────┘
┌─s──...
Descry asked 22/3, 2019 at 15:20
1
Solved
I've set up a working instance of a ClickHouse server with docker-compose. Right now I'm trying to grant privileges (write permission) to a user who is defined in users.xml as such:
<users>
...
Stich asked 17/12, 2020 at 11:52
4
Solved
Suppose I have a given time range. For explanation, let's consider something simple, like whole year 2018. I want to query data from ClickHouse as a sum aggregation for each quarter so the result s...
Escutcheon asked 8/5, 2018 at 16:46
3
Solved
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}...
Scintillation asked 3/4, 2019 at 15:51
3
Solved
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 "%Dat...
Numb asked 6/11, 2019 at 10:52
2
Solved
I know there's a bunch of system tables. If one has access to those where do I find the currently installed version?
Trometer asked 11/9, 2020 at 12:55
2
Solved
I have date as a string field in form of '2018-01-02 12:12:22', what is the right way to convert it to long int timestamp in ClickHouse SQL?
Equivocal asked 16/9, 2018 at 18:5
© 2022 - 2024 — McMap. All rights reserved.