ClickHouse Cloud spend explorer with per-team budgets

By General Input

Open one screen to see what your ClickHouse Cloud warehouse cost, break it down by service and owning team, and flag anyone over budget.

Integrations

  • ClickHouse Cloud
  • Google Sheets

Type

App

Categories

  • Finance
  • Engineering

Build me an internal app called ClickHouse Cloud Spend Explorer that our finance team and our data team can open together to answer one question: what did the warehouse cost us, and who spent it. It is a read-mostly reporting surface with a small amount of configuration it stores itself. Nothing runs on a schedule, a person opens it and explores.

The first tab is Overview. At the top put a date range picker with one-click presets for This month, Last month, Last 30 days, Last 90 days and Quarter to date, plus a custom range. Whatever range is selected drives the entire app. Pull the numbers with ClickHouse Cloud Get Organization Usage Costs for that range and show a headline total spend figure, then a row of cards splitting the total across compute, storage, backups and data transfer, each showing its share of the total as a percentage. Below that put a trend chart of spend across the range, with a toggle to stack it by those same cost categories so we can see which line item is actually growing.

The second tab is By service. Take the same cost report and break it down per service, then enrich each line so it is readable by someone who does not live in the console: call List Services to get every service in the organization and Get Service for the detail, so each row carries the service name, region, size and tags alongside its cost for the period. Make the table sortable by cost and filterable by region and by team.

Every service should map to an owning team. Resolve the team from the service tags first, using a tag key I can configure with a default of team. Where a service has no usable tag, fall back to a manual mapping that the app stores itself, and give me a small Team mapping screen where I can assign any unmapped or mis-tagged service to a team by hand. Show clearly which rows got their team from a tag and which came from the manual mapping, and surface a count of still-unassigned services so the mapping does not silently rot as new services appear.

In the same settings area let me set a monthly budget per team. On the By service tab add a per-team rollup that sums each team's spend for the selected period against its budget and flags any team over its number, with a softer warning band as a team gets close. Important detail: when the selected range is not a full calendar month, prorate the monthly budget to the length of the range for that comparison and label it on screen, so nobody reads a half month of spend as being comfortably under budget.

Add a compare control that puts the selected period next to the period immediately before it of the same length. When compare is on, every cost figure gains a delta in both dollars and percent, and the By service table gains a Biggest movers view that sorts by absolute change so the services whose cost moved most rise to the top. Call out separately any service that is new in this period with no prior spend, and any service that dropped to zero, since both wreck a percentage change and should not be presented as an infinite increase.

Put an Export button on the By service tab that appends the current breakdown to our finance spreadsheet using Google Sheets Append Values. Let me pick or paste the spreadsheet and the tab, and write one row per service carrying the period start and end dates, service name, region, size, owning team, cost by category, total cost and the budget status. Always append, never overwrite, so the sheet accumulates a history we can pivot on later, and stamp every row with the export time. Confirm in the UI how many rows were written.

A few practical things to get right. The cost report takes plain calendar dates in YYYY-MM-DD form, so every preset must resolve to exact start and end dates and the app should never send timestamps. Look up the organization id once with List Organizations before requesting costs or services, and if the API key can see more than one organization let me choose which one I am looking at. Service detail lookups are one call per service and the API is rate limited, so fetch service metadata once per load and cache it for the session instead of refetching on every filter or sort. Show a loading state while the report is being assembled, and if the cost report comes back empty for a range say so plainly rather than rendering an empty chart. Format money as currency everywhere, and keep the whole thing legible to someone in finance who has never opened ClickHouse.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seatsBuild audience segments from product usage and push to LoopsTurn the people who engage with your posts into Pipedrive leads