Category : clickhouse

I want to insert data without duplicates. Triplet of these fields should be unique ticker, kline_type, dateTime Found out that i should use ReplacingMergeTree https://clickhouse.com/docs/ru/engines/table-engines/mergetree-family/replacingmergetree/ I am trying to import clickhouse_driver def prepare_table(): client = clickhouse_driver.Client.from_url(f’clickhouse://default:{os.getenv("CLICK_PASSWORD")}@localhost:9000/crypto_exchange’) # field names from binance API client.execute(”’ CREATE TABLE IF NOT EXISTS historical_data_binance ( dateTime DateTime, closeTime Int64, open ..

Read more

Please, correct me in comments if my question is wrong I am trying to insert test data into clickhouse. For the test purpose I use datetime.now (100% correct datetime) In the last line of my code I have an error: clickhouse_driver.errors.ServerException: Code: 62. DB::Exception: Cannot parse expression of type DateTime here: 2021-11-01 00:19:12.933220, 2021-11-01 00:19:12.933237, ..

Read more

pip install clickhouse-driver Before I used PowerShell to pip install, it’s ok. And today I used pip install by command promt(CMD) and I got the following error: Microsoft Windows [Version 10.0.19042.1288] (c) Microsoft Corporation. All rights reserved. C:UsersADMIN>pip install clickhouse-driver Collecting clickhouse-driver Using cached clickhouse-driver-0.2.2.tar.gz (212 kB) Requirement already satisfied: pytz in c:usersadminappdatalocalprogramspythonpython310libsite-packages (from clickhouse-driver) ..

Read more

Am using long2ice/synch tools for mysql to clickhouse data replication on a specific table, but when am running the below command > synch –alias mysql_db etl -h getting error synch –alias mysql_db etl -h usage: synch [-h] [-c CONFIG] [–version] {etl,produce,consume} … synch: error: invalid choice: ‘mysql_db’ (choose from ‘etl’, ‘produce’, ‘consume’) How to resolve ..

Read more

when i’m using pandas to read data from clickhouse, it returns error: raise Exception("Unsupported object {}".format(item)) Exception: Unsupported object the code is similar like this: userID = [1,2,3,4] df = pd.read_sql_query( "select id, amount, ds from t_order where id in %(userID)s", ck_engine, params={‘userID’:userID}) it works fine in MySQL. Not sure what’s going on in clickhouse. ..

Read more

I am trying to insert data into clickhouse using yandex logs api (https://github.com/yndx-metrika/logs_api_integration) It uses requests as a library to send request. My error is: Code: 27, e.displayText() = DB::Exception: Cannot parse input: expected t before: n1476808621985072019t32937699t2017-05-05n1476808621985072019t32937699t2017-05-05n1476808621985072019t32937699t2017-05-05n1476808621985072019t32937699t2017-05-05 (version 19.16.4.12) While I am sending request, my query params are: {u’query’: u’INSERT INTO db.table FORMAT TabSeparatedWithNames ‘, ..

Read more