Weekly Databricks cost digest to catch spend spikes

Every Monday, get a plain-language recap of last week's Databricks spend in Slack, with the top cost drivers and any spending spikes flagged for you.

Agentic Task
DatabricksSlack BotFinanceEngineeringAI ReportsNotifications & AlertsDaily Digests
PromptCreate

Every Monday at 8am, summarize last week's Databricks spend and post a plain-language cost digest to Slack so finance and platform leads can catch cost spikes early. Run this on a cron schedule (Mondays at 8:00am in our timezone).

Use the Databricks Execute SQL Statement operation to query the Unity Catalog billing usage system table (system.billing.usage) for DBU consumption over the last 7 days versus the prior 7 days. Provide the warehouse_id of a running SQL warehouse to run the statement. Break the results down three ways: by SKU (the billed product, such as Jobs Compute or SQL warehouse usage), by workspace, and by job or warehouse. Compute two windows so week-over-week change can be calculated per group: the current 7-day window (day -7 through today) and the prior 7-day window (day -14 through day -7). Note that system.billing.usage records DBU quantities; if the workspace also exposes system.billing.list_prices, join to it to translate DBUs into an estimated dollar amount, otherwise report spend in DBUs. The workspace personal access token must have access to the system.billing schema.

After submitting the statement, poll the Databricks Get SQL Statement operation until status.state is SUCCEEDED. Keep waiting and re-checking while the state is PENDING or RUNNING, and treat FAILED or CANCELED as an error to report in the digest rather than failing silently. If the result set is paged into multiple chunks, fetch the remaining chunks so you have the complete data before analyzing.

Once the full data is back, have the agent reason over it rather than dumping the table. Identify the top cost drivers (the SKUs, workspaces, and jobs or warehouses consuming the most DBUs or dollars this week), the biggest week-over-week changes in both directions, and any anomalies (for example a job that suddenly appears with no prior baseline, or a large jump concentrated in one workspace). Flag any job or warehouse whose spend jumped more than a configurable threshold percentage (default 30%) week over week, naming it and showing the prior amount, the current amount, and the percent change.

Post the recap to Slack using the Slack Bot Send a Message operation (posted as the bot) to a configurable channel such as #databricks-costs. Write it in business terms: a short headline with total spend and the week-over-week direction, a few bullets naming the top cost drivers and notable movers, and a clearly labeled section for any threshold breaches and anomalies. Use Slack mrkdwn formatting (single asterisks for bold) and keep it skimmable for a non-technical finance or platform lead. Make the threshold percentage, the target channel, and the schedule easy to change.

Example output

*Databricks weekly cost digest: Jul 7 to Jul 13* Total usage was up *18%* week over week (about 12,400 DBUs, versus 10,500 the prior week). *Top cost drivers* • Jobs Compute: 41% of usage, up 22% • SQL warehouse analytics-prod: 28% of usage, up 9% • All-Purpose Compute: 17% of usage, roughly flat *Spending spikes over 30% (flagged)* • Job nightly-feature-backfill: 1,900 DBUs, up 140% (was 790). Worth a look. • Warehouse adhoc-bi: 610 DBUs, up 65% (was 370). *Anomalies* • New job etl-vendor-import showed up this week with 430 DBUs and no prior baseline. Ask if you want the full breakdown by product and workspace.

Additional information

What does this prompt do?
  • Pulls last week's Databricks usage and compares it to the week before, broken down by product, workspace, and job or warehouse.
  • Turns the numbers into a short, plain-language recap of total spend and where the money went, so nobody has to read a raw usage table.
  • Automatically flags any job or warehouse whose spend jumped more than the percentage you choose, plus anything that looks unusual.
  • Posts the summary to a Slack channel every Monday morning so finance and platform leads see it before the week starts.
What do I need to use this?
  • A Databricks account with permission to read your workspace's billing and usage data.
  • A Databricks SQL warehouse the report can use to run its weekly query.
  • A Slack workspace, plus the channel where finance and platform leads should get the digest.
How can I customize it?
  • Set the alert sensitivity: the percentage jump that flags a job or warehouse as a spending spike.
  • Pick the day and time it runs and the Slack channel it posts to.
  • Adjust the comparison window or the breakdown (by product, workspace, or job) to match how your team thinks about cost.

Frequently asked questions

How does it know how much we spent on Databricks?
It reads your workspace's built-in billing and usage data, compares the last seven days to the seven before, and summarizes where your Databricks usage went. If your account also tracks pricing, it can translate that usage into an estimated dollar amount.
Will it ping us for every little change?
No. It only calls out spending that jumped more than the percentage you choose, plus anything that looks unusual, so the digest stays focused on what actually matters.
Which Slack channel does it post to?
Whichever channel you point it at. Many teams use a dedicated channel like #databricks-costs so finance and platform leads see the recap in one place.
How often does it run?
By default it runs every Monday at 8am and recaps the previous seven days, but you can change the schedule to a different day, time, or cadence.
Do we need to be technical to read the digest?
No. The recap is written in plain business terms with a headline number, the top cost drivers, and any spikes flagged, so you do not need to understand the underlying usage tables.

Stop finding out about Databricks overruns too late.

Put a plain-language weekly cost recap in front of your finance and platform leads every Monday, with spending spikes flagged automatically.