Posts

Showing posts with the label clickhouse

Delete rows from table in clickhouse

Delete row from table in clickhouse: :) ALTER TABLE tablename DELETE WHERE condition

Change column name in a table in clickhouse

Change the name of one column: ALTER TABLE tablename RENAME COLUMN old_name TO new_name Change the names of multiple columns: ALTER TABLE tablename     RENAME COLUMN old_name1 TO new_name1,     RENAME COLUMN old_name2 TO new_name2

clickhouse export or import data

Export data from clickhouse into csv file: :) SELECT * FROM table INTO OUTFILE 'file' Import data from csv file: clickhouse-client -q "INSERT INTO database.tablename FORMAT CSV" < tablename.csv

Install clickhouse on FreeBSD 14.1

Image
Install command: # pkg install clickhouse Start clickhouse server $ clickhouse server Start clickhouse server without any ouput $ clickhouse server > /dev/null 2>&1 & Start clickhouse client $ clickhouse client