Open Source · Apache 2.0 v1.4.3

BigQuery Cost Optimization — Stop Guessing.
Start Attributing
Every BigQuery Dollar.

FinOps Optimizer for BigQuery is an open-source tool that uses Gemini AI to analyze BigQuery queries, detect SQL anti-patterns, and cut cloud costs — an enterprise-grade diagnostic & simulation suite that dissects slot consumption, hunts wasteful patterns, and right-sizes your Editions capacity. Deployed entirely inside your own laptop.

The full simulator is a desktop experience — open it on a larger screen for the complete console.

600+ Tests Passing
25+ Diagnostic Modules
Interactive Console

Behold the Scale of Savings

A simulated audit across 957 datasets and the top 500 queries of an enterprise organization. Switch engines below.

Physical vs. logical storage billing — with the exact ALTER SCHEMA DDL to capture every dollar.

Project Dataset Logical Cost Physical Cost Rec Savings / mo
Capabilities

Zero-Friction BigQuery Cost Optimization

Run the tool where your data lives. No third-party SaaS, no data exfiltration. One mission: eliminate waste.

✦ Flagship Capability

AI Doctor & SQL Anti-Pattern Diagnosis

Aggregates query executions across JOBS_BY_ORGANIZATION over 7–90 day lookback windows. Evaluates org-wide workloads using 5 Discovery Priority strategy modes, identifies CROSS JOIN explosions, wide-table full scans, unpruned partitions, and generates rewritten optimized SQL with estimated savings.

Powered by Gemini 3.6 Flash · Agent Platform native

5 Discovery Priority Strategies

⚖️ Balanced ROI Score 💰 Cumulative Cost 🔄 High Frequency 💾 Memory RAM Spill ⏱️ Total Slot Time

Engine Innovations

Editions Hybrid Cost ($0 Billed Fallback) Owner-Level Anti-Pattern Roll-Up Interactive SQL Translator Bridge Multi-Stage Shuffle Spill Aggregation
SQL SET @@reservation = 'projects/…/reservations/batch-etl';
Enhanced

Editions Capacity & Slot Intelligence

Vectorized NumPy engine modeling slot consumption across a full 730-hour billing month. Pinpoints optimal baseline recommendations (p80 Aggressive, p95 Balanced, Max Performance) across PAYG, 1-Year, and 3-Year commitments while exposing Fluid Scaling 60-second cooldown taxes.

Vectorized 730h Month Model Fluid Scaling Cooldown Tax Baseline vs. Autoscale Trade-Off On-Demand vs. Editions Arbitrage

Storage Hygiene & Arbitrage

Detect datasets cheaper on physical storage with automated ALTER SCHEMA DDL. Audits tables where Time Travel exceeds live bytes and resolves per-dataset TTLs.

Physical vs. Logical Arbitrage Time Travel TTL Auditing (48h min) Storage Write API Candidate Tracker
✦ v1.4.3 Feature

Executive Assessment Report

Single-click automated sequential sweep across all diagnostic modules, generating a standalone executive HTML report with synthesized KPI scorecards, workload ROI rankings, prioritized roadmap, and print/PDF optimization.

Comprehensive Analysis Sweep Executive KPI Scorecard Print & PDF Optimized
Enhanced

Hybrid Cost Attribution

Attribute blended Editions spend to individual projects with Lender Pays vs. Borrower Pays idle-slot models, Interactive vs. Batch priority, and waste tracking.

Lender vs. Borrower Pays Models Interactive vs. Batch Priority True Reservation Billing Mix
Enhanced

From Findings to Action

Move from diagnosis to action instantly. Universal CSV export preserving active search/filters, 1-click BigQuery Console deep-links, and dynamic max_bytes_billed budget caps.

Universal CSV on Every Table Console Deep-Links (Job/Dataset/Table) Dynamic Safety Budget Caps

HBO — Optimization Badges

Identifies exact engine optimizations applied to each query (Semi-Join Reduction, Join Commutation, Vectorization, Pushdown) via fault-isolated per-project fan-out.

Semi-Join & Pushdown Badges Partition-Pruned Bounds Fault-Isolated Fan-Out
100% Data Sovereignty

Trust Through Absolute Transparency

Third-party FinOps SaaS vendors demand broad cross-account IAM roles, exposing your most sensitive billing metadata. FinOps Optimizer is deployed entirely inside your local environment or private cloud infrastructure. Your data never leaves your perimeter.

Zero Data Exfiltration

Deployed entirely inside your local environment or Cloud Run. No hidden telemetry, no phoning home, no third-party storage.

Keep Your IAM Keys

Never grant cross-project Service Account access to external vendors. You own the runtime.

Open Source Clarity

Inspect every line. Apache 2.0 licensed — you know exactly what executes against your warehouse.

600+ Security Tests

Rigorously tested, sanitized and hardened against credential leaks and SQL injection.

The Process

From BigQuery Audit to Execution

A streamlined loop designed for FinOps practitioners and Cloud administrators.

01

Connect

Authenticate via ADC or Service Account. Target your Organization Project ID and region.

02

Scan & Analyze

Pull metadata and compute costs against your negotiated regional pricing — on demand, never auto-polled.

03

Apply & Save

Review recommendations and generated DDL. Apply directly from the UI and start saving immediately.

04

Govern & Guard

Enforce billing caps, run migration guardrails, and keep the Query Doctor on continuous patrol.

Transparent Economics

Zero SaaS Tax. Model Your GCP Bill.

100% open source with zero license fees. Runs entirely within your Google Cloud perimeter. Model your exact BigQuery metadata scans, Cloud Run compute, and Agent Platform costs below.

Total Estimated Cost
$18.31
Estimated spend per month (30 runs)
BigQuery On-Demand
$18.31
$6.25/TiB · ~$0.61 / run (30x/mo)
On BigQuery Editions? $0.00 incremental — see below
Cloud Run Local ($0)
$0.00
Self-hosted / $0 compute
Agent Platform Optional ($0)
$0.00
Deterministic Heuristics (0 AI)

Simulation Parameters

Organization Scale Profile Medium
Est. Datasets
~250 datasets
Tables & Partitions
~5,000 (500k part.)
Daily Query Volume
~50k / day
Metadata Scanned
100 GiB / run
Cost Per Run (List)
~$0.61 / run
Projects
25 projects
Execution Mode Run Locally
Audit Frequency Daily (30x)
Agent Platform Off (0 - Heuristic Only)
Investigations
0 / sweep (Off)
Context Budget
0 tokens
Agent Cost / Sweep
$0.00 / sweep

Spend Proportion

BigQuery (100%) Cloud Run (0%) Agent Platform (0%)

Itemized Expense Breakdown

Itemized GCP Resource Costs per Run and Estimated Monthly Spend
Layer / Resource Unit Rate Per Run Monthly Spend
BigQuery $6.25 / TiB $0.61 $18.31
Cloud Run $0.00 (Local) $0.00 $0.00
Agent Platform Gemini 3.6 Flash (Off) $0.00 $0.00
Projected Spend $0.61 $18.31
FinOps Recommendation: High-frequency scans at this scale query significant metadata volume (~2.9 TiB/month). If your organization utilizes BigQuery Editions with Slot Reservations, queries consume existing idle reservation capacity with $0 on-demand fees.
BigQuery Editions & Slot Reservations

If your organization operates under BigQuery Editions (Standard, Enterprise, Enterprise Plus) with Slot Reservations, diagnostic metadata sweeps consume idle slots from your existing reservations with $0.00 incremental on-demand query byte charges.

Zero User Table Scans: Diagnostic sweeps only query INFORMATION_SCHEMA views. User datasets and table partitions are never scanned.

Pricing Baseline: Estimates modeled on US Region On-Demand list prices ($6.25/TiB). No free-tier deductions included. Rounded for display; monthly totals computed on unrounded run metrics.

Product Roadmap
Live from GitHub

Public Product Roadmap

Transparent, community-driven development for FinOps Optimizer. Track upcoming capabilities, active engineering, and recent releases.

Explore the Interactive Kanban & Timeline

Track live issue progress, filter by release milestones, or submit your own feature requests directly on GitHub.

Release Notes

Product Release Notes

Track production releases, architectural upgrades, and newly shipped capabilities live from GitHub.

v1.4.3 Latest Release
August 13, 2026 View on GitHub ↗

🌟 Highlights & Major Capabilities

  • Report Generator Normalization & Division Safety: Standardized 30-day baseline normalization across on-demand and Editions fallback costs with strict lookback_days boundary validation.
  • Clean Scan Matrix Evaluation: Evaluated diagnostic modules with zero issues cleanly render as ✅ Passed in executive reports.
  • Universal Multi-Page CSV Export: Export full multi-page datasets from DataTables cache in active sort order.
  • Gemini 3.6 Flash & 3.5 Flash-Lite Alignment: Synced runtime economics specifications, calculator engine, and CI test matrices.

Ready to Reclaim Your
BigQuery Budget?

Deploy the open-source optimizer today and audit your entire organization in minutes.

The simulator is built for desktop screens.

bash gcloud run deploy bq-finops-optimizer --image gcr.io/$PROJECT/bq-finops
FAQ

Frequently Asked Questions

Everything you need to know about reducing BigQuery costs with AI-powered query optimization.

How does the AI Doctor optimize BigQuery queries?

The AI Doctor pulls real queries from INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION across your entire Google Cloud organization. It evaluates each query using five Discovery Priority strategy modes — Balanced ROI Score, Cumulative Cost, High Frequency, Memory RAM Spill, and Total Slot Time — then classifies anti-pattern severity with Gemini AI and generates rewritten optimized SQL with estimated cost savings.

Is FinOps Optimizer free?

Yes, it is fully open source under the Apache 2.0 license. There are zero SaaS fees — you only pay for your own BigQuery compute and Agent Platform usage. The tool runs entirely on your local machine or within your own Cloud Run environment.

Is FinOps Optimizer a Google Cloud product?

No. FinOps Optimizer is an independent, personal side project. It is not developed, maintained, supported, or endorsed by Google. BigQuery and Google Cloud are trademarks of Google LLC. This tool comes with no warranty, no SLA, and no guarantee of correctness or completeness. It is provided as-is under the Apache 2.0 license — use it at your own risk.

What BigQuery anti-patterns does it detect?

The tool detects common BigQuery anti-patterns including CROSS JOIN explosions, SELECT * on wide tables, CAST defeating partition pruning, missing clustering keys, unnecessary ORDER BY in subqueries, and redundant repeated queries. Gemini classifies each finding by severity (High, Medium, Low) and provides a rewritten optimized query with detailed reasoning.

Can I export BigQuery cost findings to CSV?

Yes. Every results table exports to CSV, and the export contains the full filtered result set — not just the rows visible on the current page. Job IDs, datasets and tables also deep-link straight into the BigQuery Console, so a finding goes from spreadsheet to console in one click.

How do I reduce BigQuery time travel storage costs?

The Storage Hygiene Auditor finds tables where time-travel storage exceeds live storage and shows each dataset's configured default_time_travel_days, so you can shorten the window only where it actually pays. It emits the matching DDL — ALTER SCHEMA `ds` SET OPTIONS(max_time_travel_hours = 48). BigQuery allows a minimum of 48 hours and a maximum of 168 hours (7 days).

How do I find pipelines that should use the BigQuery Storage Write API?

The DML Abuse Tracker aggregates high-frequency INSERT activity by destination table, reporting active days and average inserts per day. Tables sustaining hundreds of small INSERT statements per day are exactly the pipelines that should migrate to the BigQuery Storage Write API.

Does it work with BigQuery Editions?

Yes. The Editions Capacity Simulator models Standard, Enterprise, and Enterprise Plus editions with per-second billing, autoscaler simulation, and Fluid Scaling cooldown tax analysis. It recommends the optimal edition and slot capacity tier (p80, p95, max) for your workload — and calculates the exact On-Demand Equivalent Cost for each BigQuery Editions reservation.

Are you looking for beta testers and co-design partners?

Absolutely! We want to work with real users who are willing to test FinOps Optimizer in their own environments and share honest feedback. Whether you're a FinOps practitioner, a Cloud administrator, or a data engineering lead — we'd love to hear from you. Reach out directly at bettan.michael@gmail.com.

How can I contribute or help?

There are several ways to get involved:

  • Report bugs — open an issue on GitHub Issues. Please keep reports generic and never include PII, credentials, or sensitive information.
  • Request features — open a GitHub issue describing the use case you'd like to see supported.
  • Submit pull requests — if you've fixed a bug, improved performance, or added a feature, PRs are welcome.
  • Share private feedback — if you prefer to share feedback confidentially, reach out at bettan.michael@gmail.com.