MainTargetsClickhouse

ClickHouse Setup

Prerequisites

Before you begin, ensure you have:

  • Supported ClickHouse Implementations:
    • ClickHouse Cloud
    • ClickHouse Server:
      • 21.8 or higher.
      • Ensure that the ClickHouse HTTP interface (default port 8123) is enabled.

      Cluster

      ClickHouse Cluster deployment is not yet supported.

  • Database Admin Access: Sufficient privileges to create users, grant permissions. This might require admin privileges.
  • Network Connectivity: Ensure that Supermetal's services can reach your ClickHouse database. You may need to configure security groups.

Setup

Create a user & grant permissions

Visit SQL console

Log in to ClickHouse Cloud to access the SQL console and select your service.

Create a user

CREATE USER IF NOT EXISTS 'supermetal_user' IDENTIFIED WITH sha256_password BY 'strong-password';

Password Security

Replace 'strong-password' with a secure, unique password for the supermetal_user. Store this password securely, as you'll need it when configuring the target in Supermetal.

Create database

CREATE DATABASE IF NOT EXISTS target_database;

Script Variables

Replace target_database with the name of the database you want to use for storing data.

Grant permissions

GRANT CREATE DATABASE ON target_database.*, CREATE TABLE ON target_database.*, CREATE TEMPORARY TABLE ON *.*, S3 ON *.*, AZURE ON *.*, INSERT ON target_database.*, ALTER TABLE ON target_database.*, SELECT ON target_database.*, TRUNCATE ON target_database.* TO 'supermetal_user';

Script Variables

Replace target_database with the name of the database created in the previous step.

Connection Details

You'll need the following connection details to configure the target in Supermetal:

  • HTTPs URL (e.g. https://<host>.<region>.clickhouse.cloud:8443)
  • Username and password you created

IP Whitelist

You may need to add the IP address of the machine running Supermetal to the ClickHouse Cloud IP whitelist from the Service Settings -> Security -> IP Access List.

Create a user

Login into ClickHouse server as an admin user to create a user for supermetal.

CREATE USER IF NOT EXISTS 'supermetal_user' IDENTIFIED WITH sha256_password BY 'strong-password';

Password Security

Replace 'strong-password' with a secure, unique password for the supermetal_user. Store this password securely, as you'll need it when configuring the target in Supermetal.

Create database

CREATE DATABASE IF NOT EXISTS target_database;

Script Variables

Replace target_database with the name of the database you want to use for storing data.

Grant permissions

GRANT CREATE DATABASE ON target_database.*, CREATE TABLE ON target_database.*, CREATE TEMPORARY TABLE ON *.*, S3 ON *.*, AZURE ON *.*, INSERT ON target_database.*, ALTER TABLE ON target_database.*, SELECT ON target_database.*, TRUNCATE ON target_database.* TO 'supermetal_user';

Script Variables

Replace target_database with the name of the database created in the previous step.

Connection Details

You'll need the following connection details to configure the target in Supermetal:

  • HTTP interface URL (e.g. https://hostname:port)
  • Username and password you created

Last updated on