ClickHouse

ClickHouse is an open-source, OLTP database.

About

ClickHouse is a fast, open-source, column-oriented database

Available Tools

Requirements

Database User

This source uses standard ClickHouse authentication. You will need to create a ClickHouse user (or with ClickHouse Cloud) to connect to the database with. The user should have appropriate permissions for the operations you plan to perform.

Network Access

ClickHouse supports multiple protocols:

  • HTTPS protocol (default port 8443) - Secure HTTP access (default)
  • HTTP protocol (default port 8123) - Good for web-based access

Example

Secure Connection Example

sources:
    secure-clickhouse-source:
        kind: clickhouse
        host: clickhouse.example.com
        port: "8443"
        database: analytics
        user: ${CLICKHOUSE_USER}
        password: ${CLICKHOUSE_PASSWORD}
        protocol: https
        secure: true

HTTP Protocol Example

sources:
    http-clickhouse-source:
        kind: clickhouse
        host: localhost
        port: "8123"
        database: logs
        user: ${CLICKHOUSE_USER}
        password: ${CLICKHOUSE_PASSWORD}
        protocol: http
        secure: false

Tip

Use environment variable replacement with the format ${ENV_NAME} instead of hardcoding your secrets into the configuration file.

Reference

fieldtyperequireddescription
kindstringtrueMust be “clickhouse”.
hoststringtrueIP address or hostname to connect to (e.g. “127.0.0.1” or “clickhouse.example.com”)
portstringtruePort to connect to (e.g. “8443” for HTTPS, “8123” for HTTP)
databasestringtrueName of the ClickHouse database to connect to (e.g. “my_database”).
userstringtrueName of the ClickHouse user to connect as (e.g. “analytics_user”).
passwordstringfalsePassword of the ClickHouse user (e.g. “my-password”).
protocolstringfalseConnection protocol: “https” (default) or “http”.
securebooleanfalseWhether to use a secure connection (TLS). Default: false.