Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-replace-private-preview-badge-man.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
In this quick start tutorial, we’ll get you set up with OSS ClickHouse in a few
easy steps. You’ll use the ClickHouse CLI clickhousectl to install ClickHouse,
start a ClickHouse server, connect to your server to create a table,
insert data into it, and run a SELECT query.
Install the ClickHouse CLI
The ClickHouse CLI (clickhousectl) helps you install and manage local ClickHouse
versions, launch servers, and run queries. Install it with:chctl alias is also created automatically for convenience.Install ClickHouse
ClickHouse runs natively on Linux and macOS, and runs on Windows via the WSL.Use the CLI to install the latest stable version of ClickHouse:This isn’t the recommended way to install ClickHouse for production.
If you’re looking to install a production instance of ClickHouse, please see the install page.
Start the server
Start a ClickHouse server instance:Start the client
Connect to your running ClickHouse server:Insert data
You can use the familiarINSERT INTO TABLE command with ClickHouse, but it is
important to understand that each insert into a MergeTree table causes what we
call a part in ClickHouse to be created in storage. These parts later get
merged in the background by ClickHouse.In ClickHouse, we try to bulk insert lots of rows at a time
(tens of thousands or even millions at once) to minimize the number of parts
that need to get merged in the background process.In this guide, we won’t worry about that just yet. Run the following command to
insert a few rows of data into your table:Query your new table
You can write aSELECT query just like you would with any SQL database:Insert your own data
The next step is to get your own data into ClickHouse. We have lots of table functions and integrations for ingesting data. We have some examples in the tabs below, or you can check out our Integrations page for a long list of technologies that integrate with ClickHouse.- S3
- GCS
- Web
- Local
- PostgreSQL
- MySQL
- ODBC/JDBC
- Message Queues
- Data Lakes
- Other
Use the Moving the data into a ClickHouse table looks like the following, where
View our collection of AWS S3 documentation pages for lots more details and examples of using S3 with ClickHouse.
s3 table function to
read files from S3. It’s a table function - meaning that the result is a table
that can be:- used as the source of a
SELECTquery (allowing you to run ad-hoc queries and leave your data in S3), or… - insert the resulting table into a
MergeTreetable (when you’re ready to move your data into ClickHouse)
nyc_taxi is a MergeTree table:Explore
- Check out our Core Concepts section to learn some of the fundamentals of how ClickHouse works under the hood.
- Check out the Advanced Tutorial which takes a much deeper dive into the key concepts and capabilities of ClickHouse.
- Continue your learning by taking our free on-demand training courses at the ClickHouse Academy.
- We have a list of example datasets with instructions on how to insert them.
- If your data is coming from an external source, view our collection of integration guides for connecting to message queues, databases, pipelines and more.
- If you’re using a UI/BI visualization tool, view the user guides for connecting a UI to ClickHouse.
- The user guide on primary keys is everything you need to know about primary keys and how to define them.