Crosshire
← Databricks Audit
— Crosshire / Learn · Tech · Databricks · Audit

Reference & glossary

The parameters every query takes, the vocabulary the library assumes, and a worked example of the one label you will see on every dollar figure — est · at list.

Parameters

Authored from a scan of the query bodies. Most queries take a single time window; a handful hardcode it. There is no server-side default — you supply the window when you run the query.

ParameterKindTryWhat it controlsScope
:period_daysBind parameter (integer, days)30The length of the trailing analysis window. Queries filter usage_date ≥ current_date() − :period_days and exclude today. There is no built-in default — you supply it at run time; 30 is the usual starting point, 7 for a fast look, 90 for a billing-cycle view.The most common parameter — 40+ queries across every domain.
:lookback_daysBind parameter (integer, days)7Same idea as :period_days, but named separately on the node-level utilization queries where the window is a shorter, higher-resolution slice.The two node-utilization queries (compute_idle_node_ratio, node_timeline_utilization).
fixed 30-day windowHardcoded literal (not a parameter)edit the SQLAbout thirty queries — most of the governance access_* set plus several jobs / performance / optimization queries — hardcode current_date() − 30 rather than taking a bind parameter. To change their window you edit the literal in the SQL.~30 queries (most access_*, several lakeflow_* / query_* / po_*).
LIMIT 1000Result cap (hardcoded literal)raise if neededA row cap, not a filter — the heaviest-statements query returns the top 1000 statements ranked by execution time. Raise it only if the top 1000 isn't enough surface area to triage.query_costly_statements only.

Glossary

DBU (Databricks Unit)
The unit of processing Databricks meters. usage_quantity is in DBUs (or bytes / hours / tokens for non-compute SKUs) — it is a quantity, never dollars. You get dollars by multiplying DBUs by a price rate.
SKU
A billing line item — a specific priced product, e.g. ENTERPRISE_ALL_PURPOSE_COMPUTE or PREMIUM_JOBS_SERVERLESS_COMPUTE. The same work on a different SKU can cost materially more; the SKU string often encodes the tier (e.g. a (PHOTON) suffix).
record_type — ORIGINAL / RETRACTION / RESTATEMENT
How Databricks corrects billing history: it never edits a prior row. ORIGINAL is the first-billed amount; RETRACTION claws it back (a sign-flipped negative); RESTATEMENT re-bills the corrected amount. Summing all three nets the correction out exactly once — filtering to ORIGINAL overstates spend.
list price vs account price
List is Databricks' public, pre-discount rate (system.billing.list_prices). Account price is your negotiated rate (system.billing.account_prices) — which is not present in every environment. When it's absent, these queries fall back to the list/default rate and label the figure unverified.
slice
One group in a query's GROUP BY grain — e.g. a single (usage_date × cloud × SKU × product) combination. “An untagged slice” or “an unpriced slice” means one such group, not the whole account.
statement fingerprint
A de-valued form of a SQL statement: literals are replaced with ? and emails with <email>, so you see the query shape and identifiers without any literal data values. It lets you group and rank statements by structure while keeping the output safe to share.
net_dbus
Billed DBUs (usage_unit = 'DBU') attributed to a resource over the window, netted across all record types (ORIGINAL + RETRACTION + RESTATEMENT) so corrections are already applied. This is the trustworthy quantity to dollarize.
est · at list
The shorthand on every dollar figure here: an estimate computed at list price = net_dbus × list-rate. It is pre-discount, DBU-only (excludes cloud infra / egress), and directional — never your actual negotiated invoice. See the worked example below.

Worked example: est · at list

Take one warehouse that metered 12,500 DBUs over the window. Here is exactly what “est · at list” does — and what it deliberately leaves out.

net_dbus12,500 DBUs (already netted across record types)
× list rate× $0.55 / DBU (illustrative list rate from system.billing.list_prices)
= est · at list$6,875 — the pre-discount, DBU-only estimate the queries report
your actual invoice12,500 × $0.44 negotiated = $5,500 (≈ 20% discount — not in any system table here)
also excludedcloud infra + egress the SKU triggered — billed by your cloud provider, not Databricks
So the $6,875 est · at list is a ceiling for comparison and ranking, not the number on your bill. Use it to size and prioritise findings; never quote it to finance as billed spend. All figures here are illustrative, not real account data.

The manifest

Every field this library renders — query metadata, bands, params, requirements and the next graph — is published as a single machine-readable file. It’s a point-in-time snapshot of the source audit repo, re-copied whenever the library is re-synced.

Download databricks-audit-manifest.json 96 queries · domain-keyed JSON