ClickHouse
Defines a connection pool to a ClickHouse database. Utilizes clickhouse-go under the hood.
| Used by the clickhouse analytics module. |
Example
-
YAML
-
JSON
datastores:
- name: clickhouse
id: ch-0
host: clickhouse.internal
database: analytics
user: tilegroxy
password: env.CLICKHOUSE_PASSWORD
{
"datastores": [
{
"name": "clickhouse",
"id": "ch-0",
"host": "clickhouse.internal",
"database": "analytics",
"user": "tilegroxy",
"password": "env.CLICKHOUSE_PASSWORD"
}
]
}
Configuration
| Parameter | Description | Type | Required | Default |
|---|---|---|---|---|
|
The unique identifier of the datastore used to reference this datastore elsewhere in configuration |
string |
Yes |
None |
|
The hostname to use to connect to the database |
string |
No |
127.0.0.1 |
|
The port to use to connect to the database. Note the native protocol and HTTP protocol use different ports; 9000 and 8123 respectively |
uint16 |
No |
9000 |
|
The user to use to authenticate with ClickHouse |
string |
No |
default |
|
The password to use to authenticate with ClickHouse |
string |
No |
None |
|
The name of the database to connect to |
string |
No |
default |
|
The wire protocol to use. Can be |
string |
No |
native |
|
Whether to connect over TLS |
bool |
No |
false |
|
The maximum number of idle connections to keep in reserve in the connection pool. Unlike the postgresql datastore this is a ceiling on idle connections rather than a floor |
int |
No |
5 |
|
The maximum number of connections to allow in the connection pool |
int |
No |
10 |
|
The maximum amount of time (in seconds) to allow a connection to live in the pool |
int32 |
No |
1 hour |