Skip to main content

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

  1. Log in to the Aiven Console.

  2. 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.

important

You cannot create a database using ClickHouse's SQL.

  1. When the service is running, select Databases and tables from the sidebar of your service's page.

  2. In the Databases and tables page, select Create database > ClickHouse database.

  3. In the Create ClickHouse database window, enter a name for your database and select Create database.

Connect to ClickHouse

  1. Get the latest Docker image of the ClickHouse client from Docker Hub

  2. Go to the Overview page of your service, and copy the Host, Port, User, and Password, which you need for connecting to the service.

  3. Run the following command to connect to your service and run SQL queries on your database, substitute the placeholders for USERNAME, PASSWORD, HOST and PORT:

    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.