ClickHouse Cloud
Connect your ClickHouse Cloud organization to track compute, storage, data transfer, and ClickPipes costs in StackSpend.
ClickHouse Cloud
Usage Cost API — Organization billing read key required
The ClickHouse Cloud provider connects StackSpend to your organization via the ClickHouse Cloud Usage Cost API. StackSpend backfills up to 90 days of usage on first sync, then updates daily as new charges are finalized.
What StackSpend tracks
- Compute costs per warehouse and service
- Storage and backup charges
- Data transfer costs
- ClickPipes usage
- Costs denominated in ClickHouse Credits (1 CHC = 1 USD)
- 90 days of historical data, updated daily
Prerequisites
- A ClickHouse Cloud organization account
- An API key with Organization billing read access
Setup
Create an API key
In the ClickHouse Cloud console, go to Organization → API Keys → Generate API key. Set the role to Organization billing read.
Copy the Key ID and Key Secret. The secret is shown only once — store it somewhere safe before closing the dialog.
Get your Organization ID
This step is only needed if your API key can access multiple organizations. In the ClickHouse Cloud console, go to Organization → Settings and copy the Organization ID.
If your key is scoped to a single organization, you can leave this field blank in StackSpend.
Add to StackSpend
In StackSpend, go to Providers → ClickHouse Cloud. Enter your API Key ID, API Key Secret, and optionally your Organization ID. Click Save.
Data summary
| Attribute | Value |
|---|---|
| Data latency | Daily |
| Historical data | 90 days |
| Setup time | 5 min |
Frequently asked questions
What ClickHouse Cloud credentials does StackSpend need?
StackSpend needs an organization API key with the Organization billing read role, which lets it read usage costs through the ClickHouse Cloud Usage Cost API. You supply the Key ID and Key Secret, plus an optional Organization ID if the key spans multiple organizations.
Is the ClickHouse Cloud connection read-only?
Yes, the Organization billing read role only grants access to usage-cost data and StackSpend never writes to your ClickHouse Cloud organization. It reads cost by service and ClickPipe and nothing more.
How long does ClickHouse Cloud setup take?
Setup takes about 5 minutes: create the billing-read API key, optionally grab your Organization ID, and add both to StackSpend. The first sync backfills up to 90 days of usage, then updates daily.
Why does recent cost data keep changing?
Recent usage from ClickHouse Cloud can be in an "unlocked" state, meaning it is pending finalization and can still change. StackSpend re-syncs recent periods on each update cycle to capture any corrections, so the latest days settle over time.