slashpeak
Connect BigQuery

Billing export (optional)

Enable a FOCUS billing export so SlashPeak can reconcile its cost estimate against your actual GCP bill.

SlashPeak's dashboard estimates cost from INFORMATION_SCHEMA metadata — no extra setup needed. A FOCUS billing export lets it reconcile that estimate against your actual GCP invoice, and drives the network-egress, BigQuery Omni, and Datastream bands on the spend-composition chart. This is optional: everything else on the dashboard works without it.

Why this matters for pricing

On the Enterprise plan, the metered percentage of spend is charged on whichever is lower — SlashPeak's own cost estimate, or your actual GCP bill (read from this export). Without a billing export, only the estimate is available to reconcile against.

Step 1 — enable FOCUS export in GCP Billing

  1. Open Billing → Billing export in the GCP Console for the billing account tied to your BigQuery projects.
  2. Under BigQuery export, enable FOCUS export.
  3. Pick a destination project — often a separate finance/billing project, not the project SlashPeak scans.
  4. Pick a multi-region location (e.g. US or EU) for the destination dataset.

Pick multi-region if you want history

A multi-region location backfills retroactively from the start of the previous calendar month (can take up to 5 days to populate). A single-region location only backfills from the day you enable it.

Google creates a dataset named gcp_billing_immutable_<billing_account_id>_<location> (e.g. gcp_billing_immutable_01DFE2_B7D806_5C2237_us), containing one table, gcp_billing_export_focus_<billing_account_id>.

Step 2 — grant read access to that one dataset

SlashPeak's service account only needs BigQuery Data Viewer (roles/bigquery.dataViewer) on the export dataset itself — nothing on the finance project as a whole.

  1. Open the dataset in the BigQuery Console.
  2. Sharing → Permissions → Add principal.
  3. Add SlashPeak's service account email (the same one already connected).
  4. Role: BigQuery Data Viewer.

Prefer SQL? Run this in BigQuery instead (SlashPeak shows it with your values filled in if the check fails):

GRANT `roles/bigquery.dataViewer`
ON SCHEMA `<FINANCE_PROJECT>.<DATASET>`
TO "serviceAccount:<SERVICE_ACCOUNT_EMAIL>";

No other grant is needed

SlashPeak's own connected project already has bigquery.jobs.create — the query that reads this export runs there, merely referencing the export table by its fully-qualified name. Nothing beyond dataset-level Data Viewer on the export dataset is required.

Step 3 — enter the dataset name in Connection Settings

On the Connections page, open the Billing export tab. Under Billing export (optional):

  1. Enter the Finance project id that holds the dataset.
  2. Enter the Dataset name, e.g. gcp_billing_immutable_01DFE2_B7D806_5C2237_us.
  3. Click Save billing export. SlashPeak checks that it can read the dataset before it saves. If it cannot, the card shows the grant steps from Step 2, with the service account email filled in.
  4. You can change or Remove this at any time — it does not touch your BigQuery service-account key.

A brand-new export starts empty. Until Google writes the first rows, the card shows Waiting for data. Google writes the first rows within a few hours, and it can take up to 5 days. There is nothing to do: SlashPeak checks once a day, or click Sync now to check sooner. Still empty after 5 days? Check that the dataset name matches the one in your billing export settings.

What SlashPeak reads

SlashPeak does not read the FOCUS export live on every page view. Instead, it mirrors rows into its own database and refreshes that mirror from BigQuery at most once every 24 hours — the first scan past that window triggers the refresh, never a page load; you can also force one early with Sync now on the Connections page.

Only rows for BigQuery-related services (the BigQuery family plus Datastream, which feeds the Datastream/CDC band) are pulled and stored — the rest of your GCP bill in the same export (Compute Engine, Cloud Storage, and so on) is never read or kept. Rows where ChargeCategory is Tax are excluded from cost totals.

Troubleshooting

  • Table not found — double-check the dataset name, or wait: a new export can take up to 5 days to populate.
  • Permission denied — the service account is missing BigQuery Data Viewer on that specific dataset (Step 2).
  • API disabled — the BigQuery API must be enabled on SlashPeak's own connected project (it usually already is, since scans depend on it).

Disagreements with the estimate

Invoices include CUDs, credits, rounding, and non-BigQuery products. INFORMATION_SCHEMA does not. A gap between the estimate and this export is expected — see BigQuery billing summary for how the two are meant to be read together.

On this page