How much does a Databricks table cost?
Databricks bills jobs, pipelines and SQL warehouses. To know what a table costs, you have to tie the bill to the lineage. Here is how to do it with the system tables, where it stops, and what YALineo does.
Why the bill does not give the cost of a table
Databricks consumption is in the system.billing.usage system table. Each row describes a period of usage of one workload: a job, a pipeline update, a SQL warehouse, a serverless notebook, an endpoint. The usage_metadata field says which workload consumed, for example job_run_id for a job run or dlt_update_id for a pipeline update.
A table shows up by name in only one case: the uc_table_catalog, uc_table_schema and uc_table_name fields are filled for materialized views only. For every other table, the bill names the workload that writes or reads it, never the table itself. A job that writes ten tables is billed once, not ten times.
The cost of a table is therefore always the result of a sharing rule: the part of a measured spend that belongs to that table. There is no single right answer, just as in cost accounting. What matters is that the rule is written down, can be checked, and neither loses nor invents a dollar.
The system tables to join
Four system tables are enough, all read only:
| System table | What it brings |
|---|---|
system.billing.usage | The consumption of each workload, row by row, with its run (job_run_id, dlt_update_id) |
system.billing.list_prices | The list price of each SKU on each date; the effective_list key holds the price used to calculate cost |
system.access.table_lineage | Which query, which job or pipeline run reads or writes which table |
system.query.history | The compute time of each query (total_task_duration_ms), to share a run that writes several tables |
Step 1: the cost of each run
The cost of a usage row is its quantity times the list price in force at the end of that row, as in the join example of the Databricks documentation. Per job run, over the last 30 days:
SELECT u.workspace_id,
u.usage_metadata.job_id,
u.usage_metadata.job_run_id,
SUM(u.usage_quantity * p.pricing.effective_list.default) AS list_price_cost
FROM system.billing.usage AS u
JOIN system.billing.list_prices AS p
ON u.cloud = p.cloud
AND u.sku_name = p.sku_name
AND u.usage_unit = p.usage_unit
AND u.usage_end_time >= p.price_start_time
AND (p.price_end_time IS NULL OR u.usage_end_time < p.price_end_time)
WHERE u.usage_date >= date_sub(current_date(), 30)
AND u.usage_metadata.job_run_id IS NOT NULL
GROUP BY ALL
According to the documentation, job_run_id is filled for serverless jobs and jobs on job compute, not for a job launched on an all-purpose cluster. Those jobs have no run to join.
Step 2: the tables each run writes
The lineage tells, for each write, which run made it, in entity_metadata:
SELECT workspace_id,
entity_metadata.job_info.job_run_id AS job_run_id,
target_table_full_name
FROM system.access.table_lineage
WHERE event_date >= date_sub(current_date(), 31)
AND target_table_full_name IS NOT NULL
AND entity_metadata.job_info.job_run_id IS NOT NULL
GROUP BY ALL
The lineage window starts one day before the billing window: a run can write the day before it is billed.
Step 3: share each run between its tables
Joining both results on workspace_id and job_run_id (the documentation does not say that a run id is unique across workspaces) gives, for each run, its cost and the tables it wrote. What remains is sharing:
- One table written: the whole cost of the run goes to it. It is the safest case after a materialized view billed by name.
-
Several tables written: the compute time of each write gives the sharing key. It is in
system.query.history, joined to the lineage onstatement_id. That link only exists for queries run on a SQL warehouse or on serverless compute. - Several tables without a known compute time (a classic cluster): equal shares, and saying so.
- A run with no write in the lineage (a failure, a write the lineage does not capture): its cost stays unattributed. Moving it onto other tables would make their price wrong.
Pipelines follow the same rule with dlt_update_id. A SQL warehouse is shared differently, hour by hour: the cost of each hour goes to the queries that ran in that hour, in proportion to their compute time, then to the tables they write or read. An hour billed with no query at all (start-up, waiting before auto stop) goes to no table.
Step 4: check that the total adds up
The sum of the shares given to tables, of what stays unattributed and of the warehouses' capacity without queries must equal the measured spend, to the cent. If it does not, a rule lost a spend or counted it twice.
What this calculation does not tell
- It is a list price, not your invoice. Your contract discount, commitments and credits are not in it.
-
Classic compute machines are not in it.
system.billing.usageholds Databricks consumption. For a classic cluster, the virtual machine is billed by the cloud provider. On serverless, it is included in the Databricks price. - The lineage is not exhaustive. According to Databricks, its tables are a subset of all read and write events, and a record is only emitted when lineage can be inferred. An untracked write leaves the workload's cost unattributed.
- Data arrives late. Usage records are typically available within 12 hours: the last days of a period can be incomplete.
What YALineo does
YALineo runs this calculation in your browser, with your Databricks permissions, read only, with no YALineo server. It ties the bill to the lineage run by run, shares warehouses hour by hour, and shows next to each table the precision of its price: billed, single table, compute time, even split, warehouse or period. What cannot be tied stays visible as unattributed, and the total of the costs comes back to the measured spend, to the cent.
The cost of each table shows on the map, on its sheet, in the cost summary (tutorial), and as a badge in the Databricks pages (tutorial). Every rule, with its formulas and sources, is in the calculation method.
Frequently asked questions
Does Databricks give the cost per table?
Not directly, except for a materialized view, whose usage row carries its name. For other tables, you have to share the cost of the workloads that write or read them.
Does the cost of a table include its reads?
YALineo keeps them apart. The refresh of a table is its share of the runs that write it. Its reads are its share of the SQL warehouse queries that read it without writing anything. The same query is never counted twice.
What about a view?
A view keeps no data and has no refresh to pay for. A read through a view counts as a read of the view, then once for each of its sources.
Sources
Documentation read on 6 November 2026.
-
Databricks, Billable usage system table reference (page updated on 5 November 2026):
usage_metadata,job_run_id,dlt_update_id,uc_table_*fields, 12-hour delay. -
Databricks, Pricing system table reference (page updated on 4 February 2025): the
effective_listkey. - Databricks, Monitor costs using system tables (page updated on 11 September 2026): the example joining usage and prices.
-
Databricks, Lineage system tables reference (page updated on 4 November 2026):
entity_metadata,statement_id, lineage coverage. -
Databricks, Query history system table reference (page updated on 4 November 2026):
total_task_duration_ms.