Google Cloud Billing × Metabase

How to build Google Cloud cost dashboards in Metabase

Google Cloud Billing is Google Cloud's billing layer — billing accounts, budgets, committed use discounts, and a first-class BigQuery export that writes every cost line item into a dataset you own. Metabase is where you turn that billing data into shared, trustworthy cost dashboards. This guide covers two complementary paths: a lightweight MCP + CLI route that pulls live cost data with the BigQuery remote MCP server and loads a CSV into Metabase with the Metabase CLI, and a durable pipeline route that lands Google Cloud Billing cost data in a database so you can build dashboards anyone can read.

Heads up: Metabase connects to databases and warehouses — it does not ship a native Google Cloud Billing connector. The good news: billing data is tabular and warehouse-friendly. Land line items or daily rollups in a database, model amortized vs. unblended cost once, and every dashboard downstream inherits the same definitions.

How do you connect Google Cloud Billing to Metabase?

Most teams combine both routes: quick answers through MCP and CLI uploads first, then recurring cost reporting on a warehouse-backed model.

Google Cloud ships no billing-specific MCP server. The MCP route here is Google's official BigQuery MCP reading the billing export dataset — the endpoint is generic, and IAM plus the dataset name in your queries scope it to billing data.

1 · MCP + CLI route (AI-assisted)

Live cost answers in, quick analysis out

Pair the BigQuery remote MCP server with the Metabase CLI. Use MCP for live cost lookups, write a scoped result to CSV, then load it into Metabase as a ready-to-query table and model.

Best for
  • Quick questions such as "show me cloud spend by project and service"
  • Loading Google Cloud Billing cost exports into Metabase in seconds
  • Spot-checks and one-off cost investigations without pipeline work
Trade-offs
  • Great for exploration, not governed month-end cost reporting
  • Use read-only credentials or scoped API keys wherever supported
  • CSV uploads are snapshots — refresh or move to the pipeline for history
2 · Pipeline route (warehouse-backed)

Durable cost dashboards with history

Land Google Cloud Billing cost data in a database or warehouse — via billing export, connector, or scheduled API pulls — then point Metabase at it.

Best for
  • Google Cloud Billing cost dashboards finance and engineering both trust
  • Joining cost with revenue, customers, and usage for unit economics
  • Long-run trends for cloud spend by project and service and committed use discount coverage
Trade-offs
  • You own the refresh schedule and the rollup grain
  • Model amortized vs. unblended cost once, in the warehouse layer
  • Tag and label hygiene decides how far allocation can go

What can you analyze from Google Cloud Billing data in Metabase?

  • Cloud spend by project and service — built from billing export cost lines and the related projects and services, labels, credits and committed use discounts data your sync exposes.
  • Committed use discount coverage — built from billing export cost lines and the related projects and services, labels, credits and committed use discounts data your sync exposes.
  • Cost allocation by label and team — built from billing export cost lines and the related projects and services, labels, credits and committed use discounts data your sync exposes.
  • Spend anomalies and growth trends — built from billing export cost lines and the related projects and services, labels, credits and committed use discounts data your sync exposes.
  • Unit economics straight from the billing export — built from billing export cost lines and the related projects and services, labels, credits and committed use discounts data your sync exposes.

Which Google Cloud cost dashboards should you build in Metabase?

For: Platform, FinOps

Spend overview

Project and service spend from the export.

  • Net cost this month vs. last (number + trend)
  • Spend by project, top 10 (bar)
  • Spend by service across projects (stacked bar)
  • Daily net cost with credits shown (combo)
For: FinOps, finance partners

Discounts and credits

What you actually pay after credits and CUDs.

  • Gross vs. net cost by month (combo)
  • Committed use discount coverage (number + trend)
  • Credits by type (stacked bar)
  • Sustained-use and CUD savings realized (table)
For: Team leads, engineering

Allocation

Label-based cost ownership.

  • Cost by team label by month (stacked bar)
  • Unlabeled spend rate (number + trend)
  • Cost by environment label (bar)
  • Top SKUs by cost in shared projects (table)
For: Leadership

Trends

Growth and unit economics over time.

  • Month-over-month growth by project (line)
  • Budget burn vs. forecast (line)
  • Cost per customer where unit data exists (line)
  • New services appearing in the bill (table)

How do you use the BigQuery remote MCP server with the Metabase CLI?

Pair the BigQuery remote MCP server with the Metabase CLI for fast, hands-on cost analysis. MCP is useful for scoped lookups and summarized exports; the Metabase CLI's upload command loads CSV data into Metabase and creates a ready-to-query table and model.

Example workflow

  • Ask the MCP server for a summarized slice of the billing export cost lines grouped by project and service.
  • Export the result as CSV, keeping stable IDs, accounts, services, tags, and dates.
  • Run mb upload csv to load it into Metabase as a table and model, then build questions and dashboards on top.

Be honest about the limits

  • MCP lookups are excellent for exploration, not scheduled reporting.
  • A CSV upload is a snapshot; refresh it with mb upload replace or move to the pipeline for real history.
  • How much history you start with depends on the dataset's location: US and EU multi-region datasets are backfilled from the start of the month before you first enabled the export, while regional datasets only accrue from the enablement date onward.
  • mb upload csv needs an uploads database configured under Admin → Settings → Uploads.

How do you set up Google Cloud Billing MCP and the Metabase CLI?

BigQuery remote MCP serverofficial

Transport
Hosted remote MCP via Streamable HTTP
Auth
OAuth 2.0 + IAM (BigQuery read permissions)
Best for
Live scoped cost lookup and export

Metabase CLIofficial

Install
npm install -g @metabase/cli
Auth
mb auth login
Load data
mb upload csv --file data.csv
Requires
An uploads database (Admin → Settings → Uploads)
MCPExample MCP client config
{
  "mcpServers": {
    "bigquery": {
      "url": "https://bigquery.googleapis.com/mcp"
    }
  }
}

There is no dedicated Cloud Billing MCP server — the official route is Google's generic BigQuery MCP. The endpoint isn't dataset-specific: OAuth identifies the caller, IAM decides what that identity can read (grant it access to just the billing export dataset to keep the assistant scoped), and queries name the export table directly, e.g. project.billing_dataset.gcp_billing_export_resource_v1_XXXXXX. Prefer running it locally? Use MCP Toolbox: toolbox --prebuilt bigquery --stdio with application-default credentials.

TerminalLoad a Google Cloud Billing CSV with the Metabase CLI
# Install the Metabase CLI
npm install -g @metabase/cli

# Log in (opens your browser; requires Metabase v62+)
mb auth login --url https://your-metabase.example.com

# Load a billing-export-cost-lines export — creates a table AND a model
mb upload csv --file google-cloud-billing-billing-export-cost-lines.csv --collection root

# Refresh that same table later from a new export
mb upload replace <table-id> --file google-cloud-billing-billing-export-cost-lines.csv

Can you generate a Google Cloud Billing dashboard with AI?

Yes. Use the prompt below with any assistant that can run the BigQuery remote MCP server and the Metabase CLI. It works end to end: if Google Cloud Billing cost tables already exist in Metabase it analyzes those; otherwise it pulls scoped, summarized data, loads it with mb upload csv, then builds the dashboard and caveats any metric that needs missing history.

Prompt for creating a Google Cloud Billing Cloud Cost Overview dashboard
Create a polished Metabase dashboard for Google Cloud Billing cloud cost analytics.
Work end to end: get the data into Metabase if it isn't there yet, then build.

Goal: Help engineering, platform, and finance leaders understand net spend by project and service, credits and discounts, label allocation, and growth from Google Cloud Billing data.

Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for google-cloud-billing tables and
  models). If durable Google Cloud Billing cost data is already present — a billing export,
  warehouse sync, or earlier upload — use it and skip to Step 2.
- If nothing is there, pull a scoped, summarized export with the BigQuery remote MCP server:
  billing export cost lines, plus projects and services, labels, credits and committed use discounts.
  Prefer daily rollups by service, account, team, or namespace over raw line
  items. Write each result to a CSV, then load it with the Metabase CLI — run
  "mb upload csv --file <export>.csv" so each upload creates a table and a
  ready-to-query model. Use "mb upload replace <table-id> --file <export>.csv"
  to refresh an existing table instead of creating duplicates.

Step 2 — Inspect before querying:
Do not assume exact table or column names. Inspect available fields, accounts,
services, tags or labels, and date ranges before creating trend cards.

Important:
- Build on whatever data is present; don't claim Metabase connects natively to
  Google Cloud Billing — it reads a database or CLI-uploaded tables.
- State whether costs are amortized, unblended, or net of credits — and never
  mix conventions in one card.
- A single CSV is a point-in-time snapshot: only build trend cards if there is
  a usable date column or multiple periods have been uploaded.
- Exclude or clearly separate credits, refunds, and taxes from usage cost.
- Only compute unit economics (cost per customer) when a customer-level
  dimension or tag actually exists in the data.

Dashboard title: Google Cloud Billing Cloud Cost Overview

Sections:
1. Executive summary: Net cost this month; MoM growth; CUD coverage;
   Unlabeled spend rate; Credits applied.
2. Spend: Cost by project and service by month; daily net cost.
3. Discounts: Gross vs. net; CUD coverage and utilization; credits by type.
4. Allocation: Cost by team label; unlabeled spend; environment split.
5. Growth: MoM growth by project; budget burn; new services in the bill.

Filters: Date range, Provider or Account, Service, Team, Environment, Tag.

Output: Build the dashboard if you have permission; otherwise provide the exact
questions, SQL, model definitions, and layout. Include caveats for any metric
that cannot be calculated from the available data.

How do you sync Google Cloud Billing data into a database or warehouse?

For dashboards that need history and reliability, land Google Cloud Billing cost data in a database first, then connect Metabase to that database.

Connector options

  • Billing export or managed ETL — use the vendor's native export or a connector when one covers the objects you need.
  • Custom pipeline — use the Cloud Billing BigQuery export for control over rollup grain, fields, and refresh cadence.
  • MCP + CSV — use this for quick exploration and one-off slices.

No ETL needed at all: enable the detailed usage cost export to BigQuery, then connect Metabase's BigQuery driver to that dataset. Costs, credits, labels, and resource-level detail land in a warehouse table automatically — the cleanest billing-to-BI path of any cloud.

Notes

  • Decide the rollup grain first (daily per service, account, and team) — it drives warehouse cost and every trend card.
  • Land raw billing tables first, then build clean Metabase models on top.
  • Normalize project, service, label, environment, usage-date, and net-cost fields.

How should you model Google Cloud Billing data in Metabase?

Core tables

TableGrainKey columns
gcp_billing_exportone row per cost line (detailed usage cost export)usage_start_time, project_id, service_description, sku_description, cost, credits, labels, currency
cost_daily_rollupsone row per project per service per dayusage_date, project_id, service, team, environment, net_cost_usd, gross_cost_usd
commitmentsone row per committed use discountid, type, scope, commitment_amount, start_at, end_at, utilization_pct

Modeling advice

  • Build a clean cost_daily_rollups model with common columns across clouds and tools, so multi-source dashboards don't fork definitions.
  • Keep amortized, unblended, and net-of-credits cost as separate, labeled columns — never let one card silently mix them.
  • Treat tags and labels as slowly changing: they apply from when they were added, and historical spend stays untagged.
  • Separate usage cost from credits, refunds, taxes, and support fees in the model layer, not in each card.

Which Google Cloud cost metrics should you track in Metabase?

MetricDefinitionNotes
Total cloud spendNet cost (after credits) per period across projects.Always net credits — gross cost overstates the bill.
Cost per serviceSpend per service or SKU group per period.Watch for SKU churn renaming services mid-series.
Cost growth rateMonth-over-month change in net cost by project.Separate usage growth from pricing changes.
Untagged spend rateCost with no team label over total cost.Labels only apply from when they were added.

What SQL powers Google Cloud cost dashboards in Metabase?

These run directly against the billing export in BigQuery (BigQuery dialect). Replace the dataset and table names with yours.

Net cost by project by monthPostgreSQL

Cost with credits netted, straight from the export.

-- BigQuery dialect (detailed usage cost export)
SELECT
  DATE_TRUNC(DATE(usage_start_time), MONTH) AS month,
  project.id AS project_id,
  ROUND(SUM(cost) + SUM(IFNULL((
    SELECT SUM(c.amount) FROM UNNEST(credits) c
  ), 0)), 2) AS net_cost
FROM `billing_dataset.gcp_billing_export_resource_v1_XXXXXX`
GROUP BY 1, 2
ORDER BY 1, net_cost DESC;
Cost by team labelPostgreSQL

Label-based allocation with an explicit unlabeled bucket.

-- BigQuery dialect
SELECT
  DATE_TRUNC(DATE(usage_start_time), MONTH) AS month,
  IFNULL((
    SELECT l.value FROM UNNEST(labels) l WHERE l.key = 'team'
  ), 'unlabeled') AS team,
  ROUND(SUM(cost), 2) AS cost
FROM `billing_dataset.gcp_billing_export_resource_v1_XXXXXX`
GROUP BY 1, 2
ORDER BY 1, cost DESC;
Unlabeled spend share by monthPostgreSQL

How much of the bill nobody owns yet.

-- BigQuery dialect
SELECT
  DATE_TRUNC(DATE(usage_start_time), MONTH) AS month,
  ROUND(
    100.0 * SUM(IF((
      SELECT COUNT(*) FROM UNNEST(labels) l WHERE l.key = 'team'
    ) = 0, cost, 0)) / NULLIF(SUM(cost), 0), 1
  ) AS unlabeled_spend_pct
FROM `billing_dataset.gcp_billing_export_resource_v1_XXXXXX`
GROUP BY 1
ORDER BY 1;

What are common mistakes when analyzing Google Cloud Billing in Metabase?

Mixing amortized, unblended, and net-of-credits cost in one dashboard.→ Pick the convention per card and label it. Trends computed on one basis and totals on another will never reconcile — and finance will notice.
Summing cost without netting credits.→ The export's cost column is gross. Add the credits array (it's negative) or every number overstates what you actually pay.
Assuming the export can backfill whatever history you need.→ Only US and EU multi-region datasets are backfilled, and only to the start of the previous month; regional datasets start from the enablement date. Turn the detailed export on early — and pick the dataset location deliberately.
Building dashboards from live MCP lookups only.→ MCP is useful for exploration; durable cost dashboards need a database-backed model with history.

Related analytics

Related dashboards

Related integrations

FAQ

Does Metabase connect natively to Google Cloud Billing?
No. Metabase reads databases and warehouses. Land Google Cloud Billing cost data in a database first — via billing export, connector, or API pipeline — or upload a CSV with the Metabase CLI, then build Metabase models and dashboards on top.
Should Metabase replace Google Cloud Billing?
No — they answer different questions. Google Cloud Billing is built for cost operations: rate optimization, recommendations, and native views. Metabase is where you build governed, shareable cost reporting for the whole company, and join spend with revenue, customers, and product usage for real unit economics.
Which billing export should I enable — standard or detailed?
The detailed usage cost export: it adds resource-level granularity that allocation and unit-economics work eventually needs. Dataset location decides your starting history — a US or EU multi-region dataset is backfilled from the start of the previous month (allow up to five days for that retroactive load), while a regional dataset starts from the enablement date with no backfill. Either way, enable it before you need the history.
Do I need an ETL tool for Google Cloud billing data?
No — this is the cleanest setup in cloud cost analytics. Billing writes straight into BigQuery, and Metabase's BigQuery driver queries the dataset directly. Your only modeling work is a rollup view that nets credits and normalizes labels.