BigQuery cost

For BigQuery cost control

Every BigQuery job's cost tied to a table, a team and a user, with budgets and savings to act on.

  1. Operate
  2. Scheduler
  • Overview
  • Observe
  • Incidents3
  • Lineage
  • Data trust
  • Operate
  • Scheduler
  • Processing
  • Dashboards
  • Catalog
  • Contracts
SchedulerRunning now1010Overnight warehouse buildNothing running right nowMorning desk martsNothing running right now
  • Graphs and analytics
  • Scheduling rules
  • Refresh conflicts
  • Recovery

14 rulesFailing 3Late 0Paused 1No runs yet 6

NameHealthStatusScheduleNext run
Curtailed energy totalNo runs yetActiveEvery day at 08:00 · UTC08:00
Dispatch freshness lagNo runs yetActiveEvery day at 06:30 · UTC06:30
Forecast accuracy martHealthyActiveEvery day at 07:10 · UTC07:10
Grid notices stagingFailingActiveEvery day at 06:20 · UTC06:20
Maintenance backlog refreshPausedInactiveEvery day at 06:00 · UTC—
Morning desk martsHealthyFailingActiveEvery day at 05:45 · UTC05:45
Overnight warehouse buildHealthyActiveEvery day at 05:30 · UTC05:30
Settlement facts after market closeFailingActiveEvery day at 07:15 · UTC07:15
Settlements row volumeNo runs yetActiveEvery day at 07:40 · UTC07:40
Solar and battery stagingHealthyActiveEvery day at 05:15 · UTC05:15
Turbine output row volumeNo runs yetActiveEvery day at 06:00 · UTC06:00
Turbine telemetry stagingHealthyActiveEvery day at 05:05 · UTC05:05
Wind speed null shareNo runs yetActiveEvery day at 06:15 · UTC06:15
Work order duplicate shareNo runs yetActiveEvery day at 06:45 · UTC06:45
Desk marts failedHighjust now

Quota exceeded: the slot reservation was fully used by another job

Demo estateNistor opens an incident on the failed run.

Today

  • The BigQuery bill is one number per project.
  • Nobody can say which table, team or schedule spent it.
  • A rule that reruns a heavy model costs as much as the run, every time.

With Nistor

  • A Dataform run is blocked when its dry-run estimate is above your limit.
  • A cap per rule and period opens an incident instead of running on.
  • With FinOps, every job's cost tied to a table, a team and a user.

Your first week. One step a day; the quickstart has the commands.

  1. Day 1

    Gate the Dataform rules

    Set max_estimated_cost_usd on the rules that run Dataform.

  2. Day 2

    Cap the busiest rule

    A cost_limit per period.

  3. Day 3

    Check and push the file

    Validate it, then sync it from CI.

  4. Day 4

    Add FinOps

    Install the FinOps module of Nistor Enterprise and approve the first savings.

The commands for each day are in the quickstart →

Details. How each part works, in more depth.

Cost gates on the scheduler are open source. max_estimated_cost_usd dry-runs the SQL of a Dataform run first, and blocks the run, recorded as failed, when the estimate is above the limit. cost_limit caps a rule's spend per period, and hitting it opens an incident. The BigQuery events Nistor reads record the bytes billed per job.

The Google Cloud docs show a gate on a Dataform rebuild:

- name: Rebuild acme-dwh when a source changes
  priority: 3
  status: active
  code_id: dwh/acme-source-change
  applies_to:
    node_type: DataformAction
    tags:
      - dwh_rebuild
  when:
    events:
      - origin: ancestors
        types: data_updated
        ancestor_depth: direct
    wait_for_all_ancestors: true
  if:
    quiet_period_seconds: 300
    max_estimated_cost_usd: 5
  then:
    target:
      same_as_applies_to: true
      scope: node
    do:
      kind: single
      action:
        type: dataform_run
        parameters:
          release: projects/acme-data-prod/locations/europe-west1/repositories/acme-dwh/releaseConfigs/daily

Where the cost comes from

The FinOps module of Nistor Enterprise prices each BigQuery job's billed bytes with the rate cards installed with Nistor. These are estimates at list price, not your invoice. It attributes the cost to the assets, users, rules and domains Nistor knows. Storage comes from the INFORMATION_SCHEMA views of each monitored project. A Cloud Billing export adds rented infrastructure, such as Composer environments and Data Fusion instances. When FinOps cannot price an asset, it says why, and does not show $0.00.

Who spent it

Cost Explorer shows cost by node, rule and run. Users shows estimated cost and query volume per user. Chargeback shows cost by business domain and by certified data product; its domains come from the Catalog module. Pricing Model compares BigQuery on-demand pricing with slot editions, by project, dataset, table or query.

Budgets and anomalies

A FinOps budget caps spend on a user, project, dataset, node, domain or cost centre, over a period from a minute to a year. Budgets are checked every 15 minutes. A breach sends an alert, and with the incident action it also opens a budget_exceeded incident. A budget does not stop work; a rule's cost_limit does. Each day FinOps checks the 20 projects that cost most over 30 days, and flags a day that breaks above the trend by at least $50. An anomaly opens a cost_anomaly incident for the project, and anomalies on the following days fold into it.

Savings to approve

FinOps lists savings: unused tables and materialized views, stale snapshots, storage drift, Cloud Storage lifecycle rules and Google Recommender's checks. Ten types can be executed. The preview shows the change, the estimated saving and how to undo it. Just before the change, FinOps checks the resource again: a table queried in the last 90 days is not dropped. A dropped table leaves a snapshot that expires after 30 days. Destructive types need their own permission, and a second person's approval above a size you set.

In Rule Lab and your assistant

With FinOps, Rule Lab shows the measured spend of the nodes a draft rule would win, over the replay window. It is spend already incurred, not a forecast. Over MCP, nistor_finops_costs, nistor_cost_anomalies and nistor_cost_to_produce need the FinOps module.

Rule Lab replaying a scheduling rule over the last 30 days: when it would have fired, run by run.Rule Lab replaying a scheduling rule over the last 30 days: when it would have fired, run by run.

See your platform as one graph, on your laptop. Explore the demo estate, or book a walkthrough on one like yours.