YALineo
EN
Install

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.

Updated on 6 November 2026 · Abdouramane Youssouf

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 tableWhat it brings
system.billing.usageThe consumption of each workload, row by row, with its run (job_run_id, dlt_update_id)
system.billing.list_pricesThe list price of each SKU on each date; the effective_list key holds the price used to calculate cost
system.access.table_lineageWhich query, which job or pipeline run reads or writes which table
system.query.historyThe 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:

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

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.