DATA OPS

Daily BigQuery Scheduled-Query Cost Attribution to Owners

Each morning, totals the prior day's on-demand bytes-billed per scheduled query, maps each query to its owner from a label, and posts a per-owner cost leaderboard to Slack.

CategoryData Ops
Enginesim
Difficultyintermediate
Triggerschedule
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerDaily schedule after midnight (billing TZ)
  • ActionQuery INFORMATION_SCHEMA.JOBS for prior-day bytes billedGoogle BigQueryBigQuery
  • LogicConvert bytes to cost and group by owner label
  • LogicRank owners and flag queries over threshold
  • OutputPost per-owner cost leaderboard to SlackSlack

What it does

Reads yesterday's `INFORMATION_SCHEMA.JOBS` to compute bytes-billed and estimated dollar cost for every job launched by a scheduled query, then groups the spend by the `owner` label attached to each query. The result is a ranked Slack digest showing who drove the most cost the previous day, so attribution is a daily habit instead of a quarterly fire drill.

When to use it

Run this when your team uses BigQuery scheduled queries and on-demand pricing, and finance keeps asking "who is spending the money." It turns an opaque project-level bill into a named, sortable list your data platform owner can act on.

How it works

  1. 1A daily schedule fires after midnight in your billing timezone.
  2. 2Query `region-*.INFORMATION_SCHEMA.JOBS` for the prior day, filtering to scheduled-query jobs and summing `total_bytes_billed`.
  3. 3Convert bytes to dollars using the configured on-demand rate and join the `owner` label.
  4. 4Rank owners by cost and flag any single query above the alert threshold.
  5. 5Post a formatted leaderboard to the data-platform Slack channel.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect BigQueryDatasets, queries, schemas.
  2. 2
    Connect SlackChannels, DMs, threads, mentions.
  3. 3
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  4. 4
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  5. 5
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.