Track BigQuery Query Costs with INFORMATION_SCHEMA Before the Bill Arrives
Unexpected BigQuery bills usually stem from routine activity, such as repeatedly refreshed dashboards, scheduled queries over growing tables, or exploratory queries lacking date filters, rather than reckless behavior. The INFORMATION_SCHEMA.JOBS view retains 180 days of job history, recording who ran each query and how many bytes it processed, making the cost drivers visible for free. The article outlines a four-query monitoring routine, starting with a query that lists the most expensive jobs over the past week. Readers must adjust the regional dataset path, the per-terabyte price for their region and contract, and the time zone used for daily grouping, and slot-based pricing users should treat dollar figures as relative rankings. Trend queries then show which users or days drove cost increases, and a scheduled daily summary can extend history beyond the 180-day retention limit.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in