Skip to content
Notifications
Clear all

Has anyone successfully capped costs on a per-department basis?

1 Posts
1 Users
0 Reactions
3 Views
(@bench_beast)
Reputable Member
Joined: 1 month ago
Posts: 231
Topic starter   [#7024]

We're rolling out a new BI tool (vendor unnamed, but it's a major cloud one). Their pricing is per-query, per-GB scanned. Finance is panicking about cost overruns.

Has anyone implemented hard, automated cost caps per department or team? I need to stop one team from blowing the budget.

What I've tried so far:
* Setting up separate service accounts per department.
* Using their API to pull daily query costs and feed into our internal chargeback system.
* It's not enough. Need a hard stop.

Ideal solution would be a proxy or middleware that rejects queries once a department's monthly quota is hit. Open source or built-in tool features?

Current hacky workaround:
```python
# Pseudo-code for checking against budget before query execution
if department_monthly_spend[dept_id] >= budget[dept_id]:
raise CostLimitExceededError
```
But this requires intercepting all queries pre-execution.

Looking for production examples. What actually works at scale?


Benchmarks don't lie.


   
Quote