ClickHouse Source
ClickHouse is an open-source, OLTP database.
2 minute read
About
ClickHouse is a fast, open-source, column-oriented database
Available Tools
ClickHouse Source Tools
| Tool Name | Description |
|---|---|
| clickhouse-execute-sql Tool | A "clickhouse-execute-sql" tool executes a SQL statement against a ClickHouse database. |
| clickhouse-sql Tool | A "clickhouse-sql" tool executes SQL queries as prepared statements in ClickHouse. |
| clickhouse-list-databases Tool | A "clickhouse-list-databases" tool lists all databases in a ClickHouse instance. |
| clickhouse-list-tables Tool | A "clickhouse-list-tables" tool lists all tables in a specific ClickHouse database. |
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
kind: sources
name: secure-clickhouse-source
type: clickhouse
host: clickhouse.example.com
port: "8443"
database: analytics
user: ${CLICKHOUSE_USER}
password: ${CLICKHOUSE_PASSWORD}
protocol: https
secure: true
HTTP Protocol Example
kind: sources
name: http-clickhouse-source
type: 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
| field | type | required | description |
|---|---|---|---|
| type | string | true | Must be “clickhouse”. |
| host | string | true | IP address or hostname to connect to (e.g. “127.0.0.1” or “clickhouse.example.com”) |
| port | string | true | Port to connect to (e.g. “8443” for HTTPS, “8123” for HTTP) |
| database | string | true | Name of the ClickHouse database to connect to (e.g. “my_database”). |
| user | string | true | Name of the ClickHouse user to connect as (e.g. “analytics_user”). |
| password | string | false | Password of the ClickHouse user (e.g. “my-password”). |
| protocol | string | false | Connection protocol: “https” (default) or “http”. |
| secure | boolean | false | Whether to use a secure connection (TLS). Default: false. |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.