Get started with Aiven for ClickHouse®
Start using Aiven for ClickHouse® by creating a service, adding a database, and connecting using Docker.
Create a ClickHouse service
-
Log in to the Aiven Console.
-
Create an Aiven for ClickHouse® service.
Once the service is ready, its status changes to Running, which typically takes a couple of minutes, depending on your selected cloud provider and region.
Create a database
Create a database either in the Aiven Console or programmatically using the Aiven API.
You cannot create a database using ClickHouse's SQL.
- Aiven Console
- Aiven API
-
When the service is running, select Databases and tables from the sidebar of your service's page.
-
In the Databases and tables page, select Create database > ClickHouse database.
-
In the Create ClickHouse database window, enter a name for your database and select Create database.
Call the ServiceClickHouseDatabaseCreate endpoint to create a database.
Connect to ClickHouse
-
Get the latest Docker image of the ClickHouse client from Docker Hub
-
Go to the Overview page of your service, and copy the Host, Port, User, and Password, which you need for connecting to the service.
-
Run the following command to connect to your service and run SQL queries on your database, substitute the placeholders for
USERNAME
,PASSWORD
,HOST
andPORT
:docker run -it \
--rm clickhouse/clickhouse-client \
--user USERNAME \
--password PASSWORD \
--host HOST \
--port PORT \
--secure
For more information on using the ClickHouse client, see Connect to a ClickHouse® cluster with CLI.
Next steps
Now that you have your service and connection set up, see Load sample data into Aiven for ClickHouse® to try out your service with actual data.