Skip to content

BigQuery Ingestion Cost Audit

Managed ELT tools don’t just charge a licence. Most of them land data in a staging table and then run a MERGE or dedup query on every sync, in your project, on your BigQuery bill. This script shows how much that costs you.

Download bigquery-ingestion-cost-audit.sql

  1. Open the BigQuery console in a project your ingestion tool writes to. You need roles/bigquery.resourceViewer on that project (or bigquery.jobs.listAll and bigquery.tables.list).

  2. Paste the script and replace every region-eu with your dataset location, for example region-us or region-europe-west1.

  3. Adjust the parameters at the top:

    ParameterDefaultNotes
    lookback_days30Up to 180, the INFORMATION_SCHEMA.JOBS retention.
    ingestion_principals%fivetran%, %airbyte%, %stitch%LIKE patterns for your ingestion service accounts.
    on_demand_usd_per_tib6.25On-demand price in US and EU multi-regions.
    slot_hour_usd0.04Editions price: Standard 0.04, Enterprise 0.06. Check your region.
    storage_usd_per_gib_month0.02Active logical storage.
  4. Run it. Each section returns its own result set: click through them in the results panel.

Repeat in every project your ingestion tool writes to.

A. Ingestion compute: jobs, slot-hours, bytes billed and estimated cost per tool, service account and statement type. Query jobs are priced on demand when they ran without a reservation, by slot-hour otherwise. Load jobs are counted at zero, since they run on BigQuery’s free shared slot pool.

B. Monthly run-rate per tool: the same numbers projected to a month and a year, with the cost of rewrite passes (MERGE, DML, CREATE TABLE AS SELECT) split out.

C. Top 20 destination tables: where the money goes. A table with many query jobs and few load jobs is being rewritten on every sync.

D. Top 25 principals: every principal’s share of the project’s compute, ingestion or not. Use it to find your ingestion service account if the defaults don’t match, or to put the ingestion number in context next to dbt and BI.

E. Ingestion storage: staging and raw datasets (airbyte_internal, fivetran_*_staging) and the tables your ingestion writes to. Time-travel bytes are only billed on the physical storage model, and frequent MERGEs inflate them.

F. Billing export cross-check (optional, commented out): your actual monthly BigQuery cost by SKU from the Cloud Billing export, to sanity-check the estimates.

  • Editions estimates use the slot time jobs actually consumed. Autoscaling bills in 50-slot steps with a one-minute minimum, so your real cost is higher.
  • The tool licence (Fivetran MAR, Airbyte Cloud credits) is not in BigQuery. Add it to get the full picture.
  • If section B shows most ingestion cost in rewrite passes, landing data with load jobs instead removes most of that compute. This is how Bizon’s batch BigQuery destination works.