Glossary · Cost and FinOps
What is Dead-end table?
A dead-end table is written to on a schedule but never read downstream: no query, dashboard or pipeline consumes it. You pay for the compute that rebuilds it and for its storage, so removing it usually saves more than removing a table that is merely unused.
Dead end versus unused
An unused table is a storage problem. A dead-end table is a compute problem: a pipeline keeps running, scanning sources and writing results that nothing downstream reads. On on-demand pricing every rebuild bills the bytes it scans; on editions it takes slot time from the reservation that other workloads could use. Because the cost repeats with every run, the compute bill for a frequently rebuilt dead end can exceed its storage bill many times over.
In lineage terms, a dead end is a leaf node that is still being written: data flows in and stops.
How dead ends happen
- A dashboard or report was deleted, but the models feeding it still run.
- A model was replaced by a new version, and the old one stayed in the schedule.
- A migration copied every pipeline, including ones nobody used on the old platform.
- An experiment, backfill or debugging table was added to a schedule and forgotten.
- A full refresh runs hourly because nobody revisited the schedule after launch.
How to find dead-end tables on BigQuery
Writes show up in INFORMATION_SCHEMA as jobs with a destination_table; reads show up in referenced_tables. A dead end is a table with writes and no reads by any job other than the ones writing it:
WITH writes AS (
SELECT
destination_table.project_id AS project_id,
destination_table.dataset_id AS dataset_id,
destination_table.table_id AS table_id,
COUNT(*) AS write_jobs,
ROUND(SUM(total_slot_ms) / 3600000, 1) AS write_slot_hours,
ROUND(SUM(total_bytes_billed) / POW(1024, 4), 2) AS write_tib_billed
FROM `region-us`.INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION
WHERE creation_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
AND job_type IN ('QUERY', 'LOAD', 'COPY')
AND (statement_type != 'SCRIPT' OR statement_type IS NULL)
AND destination_table.table_id IS NOT NULL
AND NOT STARTS_WITH(destination_table.dataset_id, '_') -- skip anonymous query-result tables
GROUP BY project_id, dataset_id, table_id
),
reads AS (
SELECT DISTINCT t.project_id, t.dataset_id, t.table_id
FROM `region-us`.INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION AS j,
UNNEST(j.referenced_tables) AS t
WHERE j.creation_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
-- a MERGE that reads its own target is not a downstream read
AND CONCAT(t.project_id, '.', t.dataset_id, '.', t.table_id)
IS DISTINCT FROM CONCAT(j.destination_table.project_id, '.',
j.destination_table.dataset_id, '.', j.destination_table.table_id)
)
SELECT w.*
FROM writes AS w
LEFT JOIN reads AS r USING (project_id, dataset_id, table_id)
WHERE r.table_id IS NULL
ORDER BY w.write_slot_hours DESC;
The results are sorted by what the writes cost: slot-hours for reservation jobs, TiB billed for on-demand jobs (multiply by your price per TiB from BigQuery pricing, or price both in the pricing calculator). Excluding self-reads matters because MERGE statements and incremental dbt or Dataform models read their own target.
Check before you switch off
- Reads that aren't query jobs. Exports, Storage Read API sessions (Spark and Dataflow connectors, for example) and table previews don't populate
referenced_tables; Data Access audit logs record them. - Readers outside the organization, such as partners reading a shared dataset, don't appear in JOBS_BY_ORGANIZATION.
- Rare readers. A table read once a quarter looks dead in a 30-day window; widen the window for reads (JOBS keeps 180 days).
- Consumers outside BigQuery. A reverse ETL tool or an application reading through the API may be the only consumer.
Switch off in the right order
Pause the writer first: disable the scheduled query, set enabled: false on the dbt model, remove the action from the Dataform workflow configuration, or pause the Airflow DAG (or delete the task). Wait a full cycle of the slowest consumer you can think of, then set an expiration on the table or delete it. Record the decision next to the lineage so the pipeline doesn't come back in the next migration.
VEED's data team used Masthead to find dead-end workloads, removed them and moved suitable dbt and Airflow jobs to reservations, cutting BigQuery compute cost by about 30% (case study, how it works).
FAQ
What is the difference between an unused table and a dead-end table?
An unused table is not read and may not be written either, so it only costs storage. A dead-end table is still written by a scheduled query, a dbt or Dataform model or a load job, and nobody reads the result, so it costs compute on every run as well as storage.
Should I delete the table or stop the pipeline first?
Stop the job that writes it first: that is where most of the cost is, and pausing a schedule is easy to undo. Keep the table for a grace period, for example with an expiration, in case a consumer you missed turns up.
