Getting started with Aiven for ClickHouse®

The first step in using Aiven for ClickHouse® is to create a service and a database that you can use to try out the service. You can do this in the Aiven web console.

This example shows you how to create a new service, add a database to it, and use Docker to connect to the service with the ClickHouse client.

Create a ClickHouse service

  1. Log in to the Aiven web console.

  2. Follow these instructions to create a new ClickHouse service.

    Once the service is ready, the status changes to Running. This typically takes a couple of minutes, depending on your selected cloud provider and region.

Create a database

  1. When the service is running, go to the Databases & Tables tab.

  2. Enter a name for your database, then click Create database.

Note

All databases must be created through the web console.

Connect to ClickHouse

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

  2. Go to the Overview tab and copy the Host, Port, User, and Password parameters that you need for connecting to the service.

  3. Run the following command to connect to your service and run an SQL query on your database:

    docker run --interactive \
    --rm clickhouse/clickhouse-client \
    --user USER-NAME \
    --password USER-PASSWORD \
    --host YOUR-HOST-NAME.aivencloud.com \
    --port YOUR-PORT \
    --secure \
    --query="YOUR SQL QUERY GOES HERE"
    

For more information on using the ClickHouse client, see this article.

Next steps

Now that you have your service and connection set up, see our sample dataset article to try out your service with actual data.