# ClickHouse

Bring your ClickHouse Cloud costs into Pump View. See service-level usage broken down by compute, storage, backup, and data transfer so you can track data warehouse spend alongside your cloud costs.

**Setup time:** \~3 minutes

**Access level:** Read-only

***

### Prerequisites

* **An API Key ID and API Key Secret.** Generated from the ClickHouse Cloud Console under API Keys.
* **Key scoped to your Organization** with a **Developer** role or higher (read-only / viewer access).
* **A paid ClickHouse Cloud plan.** Usage cost data is not available on free-tier plans.

***

### Setup Instructions

#### 1. Create an API Key

1. Log in to [clickhouse.cloud](https://clickhouse.cloud/) as an Organization Admin.
2. Go to **Organization → Settings → API Keys**.
3. Click **New API Key**.

#### 2. Configure and Copy

1. Set the **scope** to **Organization**.
2. Set the **role** to **Developer** or higher.
3. Click **Create**.
4. Copy both the **Key ID** and the **Key Secret**. The secret is only displayed once.

> **Important:** You need both the Key ID and Key Secret. They're used together for authentication. If you lose the secret, you'll need to generate a new key pair.

#### 3. Connect in Pump

1. In Pump, go to **Settings → Integrations**.
2. Find **ClickHouse Cloud** and click **Connect**.
3. Enter your **Key ID** and **Key Secret**.
4. Pump auto-detects your Organization ID.
5. Click **Connect**.

#### 4. Verify

Pump validates via Basic Auth and backfills up to **365 days** of cost data. Your per-service compute, storage, and transfer costs should appear within a few minutes.

***

### What Data Does Pump Pull?

| Data              | Description                                      |
| ----------------- | ------------------------------------------------ |
| **Compute**       | Per-service compute costs (CPU and memory usage) |
| **Storage**       | Data storage costs per service                   |
| **Backup**        | Backup storage and retention costs               |
| **Data transfer** | Network egress and data transfer costs           |

### Frequently Asked Questions

#### What's the difference between the Key ID and the Key Secret?

ClickHouse Cloud uses a two-part credential system. The **Key ID** identifies the key, and the **Key Secret** authenticates it. You need both to connect. Think of them like a username and password.

#### I don't see the API Keys section in my Organization settings.

You may not have Organization Admin access. Only Organization Admins can manage API keys. Ask an existing Admin to create the key for you.

#### What role should I assign to the key?

**Developer** is the minimum role required. It provides read-only access to usage and cost data. You can also use a higher role, but Developer is sufficient and follows the principle of least privilege.

#### Does this work with the ClickHouse Cloud free tier?

No. Usage cost data is only available on paid ClickHouse Cloud plans. If you're on the free tier, the integration won't return cost data.

#### How far back does Pump pull data?

Pump backfills up to 365 days of historical cost data from the date you connect.

#### Does Pump access my ClickHouse databases or query data?

No. Pump only reads organization-level usage and billing data. It cannot access your databases, tables, queries, or any stored data.

#### Can I revoke the key later?

Yes. You can delete the API key from the ClickHouse Cloud Console at **Organization → Settings → API Keys** at any time. This will disconnect the integration in Pump.

#### My data isn't showing up after connecting.

* Confirm you entered both the Key ID **and** the Key Secret (they are separate fields).
* Verify the key is scoped to the **Organization** level (not a single service).
* Ensure the key role is Developer or higher.
* Check that you're on a paid ClickHouse Cloud plan.
* Wait a few minutes for the initial backfill.
* If the issue persists, reach out to <support@pump.co>.

***

### Need Help?

Contact <support@pump.co> with any questions.
