Clickhouse is a popular open-source column-oriented database management system that is designed for fast analytical queries and real-time data processing. It is particularly well-suited for handling large volumes of data and has been used by companies like Yandex, Alibaba, and Uber for their data warehousing and analytics needs.
This is a simple guide to playing with Clickhouse.
Run clickhouse server
docker run -d \
-v $(realpath ./ch_data):/var/lib/clickhouse/ \
-v $(realpath ./ch_logs):/var/log/clickhouse-server/ \
--name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server
The server should be started after downloading Clickhouse image.
Start clickhouse client
docker run -it --rm --link some-clickhouse-server:clickhouse-server --entrypoint clickhouse-client clickhouse/clickhouse-server --host clickhouse-server
This will open a Clickhouse client session, and you can start issuing commands to the Clickhouse server. Let's test the following query:
SHOW DATABASES
SELECT version()
Stop clickhouse server
docker stop some-clickhouse-server
Start existing clickhouse server
docker start some-clickhouse-server
Top comments (0)