DATA OPS

BigQuery Cost Regression Auto-Incident

When a scheduled query's daily cost exceeds a hard dollar threshold, it opens a PagerDuty incident and a tracking issue in Linear with the attributed query and projected monthly…

CategoryData Ops
Enginesim
Difficultyintermediate
Triggerschedule
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerDaily schedule
  • ActionCompute per-query cost in dollarsGoogle BigQueryBigQuery
  • LogicFlag queries over dollar threshold + project overage
  • ActionTrigger PagerDuty incidentPagerDutyPagerDuty
  • OutputFile Linear tracking issueLinearLinear

What it does

Escalates severe BigQuery cost regressions into real incidents: it converts daily slot-hours to dollars, and when one query crosses a hard spend threshold it pages on-call and files a tracking ticket with the projected monthly impact.

When to use it

For production warehouses where a runaway scheduled query can cost thousands before anyone notices. Use the dollar threshold to page only on genuinely expensive regressions, not noise.

How it works

  1. 1A scheduled trigger runs every morning.
  2. 2A BigQuery query computes per-scheduled-query slot-hours and converts to estimated cost using your on-demand or flat-rate pricing.
  3. 3A logic step flags any query whose daily cost rose above the configured dollar threshold and projects the monthly overage if sustained.
  4. 4If a query crosses the line, a PagerDuty action triggers an incident routed to the data on-call.
  5. 5A Linear action files a tracking issue with the query name, job ID, cost delta, and projection.
  6. 6If nothing crosses, the run ends without paging.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect BigQueryDatasets, queries, schemas.
  2. 2
    Connect PagerDutyIncidents, on-call, escalations.
  3. 3
    Connect LinearIssues, projects, cycles, triage.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    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.