ClickHouse

Defines a connection pool to a ClickHouse database. Utilizes clickhouse-go under the hood.

Currently used by the clickhouse analytics module.

Name should be "clickhouse"

Configuration options:

Parameter Description Type Required Default

ID

The unique identifier of the datastore used to reference this datastore elsewhere in configuration

string

Yes

None

Host

The hostname to use to connect to the database

string

No

127.0.0.1

Port

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

User

The user to use to authenticate with ClickHouse

string

No

default

Password

The password to use to authenticate with ClickHouse

string

No

None

Database

The name of the database to connect to

string

No

default

Protocol

The wire protocol to use. Can be native or http

string

No

native

Secure

Whether to connect over TLS

bool

No

false

MinConnections

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

MaxConnections

The maximum number of connections to allow in the connection pool

int

No

10

Lifetime

The maximum amount of time (in seconds) to allow a connection to live in the pool

int32

No

1 hour

Example:

datastores:
  - name: clickhouse
    id: ch-0
    host: clickhouse.internal
    database: analytics
    user: tilegroxy
    password: env.CLICKHOUSE_PASSWORD