# ClickHouse

High-performance OLAP database

- Category: Databases
- Runs in: the Phloem cloud

Lets you and Hamming query a ClickHouse server with SQL, with its tables listed in Trace.

## What Phloem reads
- Tables and columns of every database the user can see, listed in Trace for Hamming and SQL autocomplete
- `system` and `information_schema` are left out

## What you need
- The server's host and port, reachable from Phloem's cloud: the HTTP port (8123 by default, 8443 for HTTPS) or the native TCP port (9000 by default)
- The database name
- A username (default `default`) and password. A read-only user is best.

Your credentials are stored in Phloem's cloud and used only to query this server.

## Connect
Under **Protocol**, choose **HTTP (port 8123)** unless you need native TCP. Port 8443 connects over HTTPS.

## What Hamming can do
- Run SQL that you or Hamming write

## Notes
- Phloem runs any statement, not only `SELECT`. The user's grants decide what a query can change.
- A dedicated read-only user with quotas keeps the load predictable.

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| Host | Text | Yes |  |
| Port | Number | No |  |
| Database | Text | Yes |  |
| Username | Text | No |  |
| Password | Secret | No |  |
| Protocol | One of | No | HTTP recommended for most use cases |
