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.
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.
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.
- 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
- 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
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.
- 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
- 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?
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)
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)
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)
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 csvto 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 replaceor 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 csvneeds 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)
{
"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.
# 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.csvCan 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.
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
| Table | Grain | Key columns |
|---|---|---|
gcp_billing_export | one row per cost line (detailed usage cost export) | usage_start_time, project_id, service_description, sku_description, cost, credits, labels, currency |
cost_daily_rollups | one row per project per service per day | usage_date, project_id, service, team, environment, net_cost_usd, gross_cost_usd |
commitments | one row per committed use discount | id, type, scope, commitment_amount, start_at, end_at, utilization_pct |
Modeling advice
- Build a clean
cost_daily_rollupsmodel 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?
| Metric | Definition | Notes |
|---|---|---|
| Total cloud spend | Net cost (after credits) per period across projects. | Always net credits — gross cost overstates the bill. |
| Cost per service | Spend per service or SKU group per period. | Watch for SKU churn renaming services mid-series. |
| Cost growth rate | Month-over-month change in net cost by project. | Separate usage growth from pricing changes. |
| Untagged spend rate | Cost 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.
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;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;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?
cost column is gross. Add the credits array (it's negative) or every number overstates what you actually pay.