RBENREJEB@RBR-OS:/OPT/DATAFORM-INTELLIJ-PLUGIN/FEATURES/BIGQUERY-COST$ CAT README
FEATURES
BigQuery cost
Google Cloud Dataform Plugin for IntelliJ · Features
The plugin tells you what a query will cost before you run it, and what it cost once it ran.
Before running
The compiled preview dry-runs every query of the file and shows:
- for each action and each assertion, the bytes the query would process and their estimated cost;
- in the header, the Estimated total of the file. When some queries cannot be estimated, it says how many it covers, for example Estimated (2 of 3).
Hover a cost to see how it was priced: the location of the query, the price per TiB and where the price comes from.
Scripts
BigQuery cannot estimate the bytes of a script: a query behind pre-operations, or several statements. Instead of a cost, the preview shows Run to estimate, and its tooltip says why.
Run Query measures it. While the query runs, the label reads Measuring…; the query runs without the BigQuery cache, so it is billed. The label then shows the bytes processed and the cost of the bytes billed by that run. When you change the query afterwards, the figure stays, and its tooltip says it was measured by an earlier version of the query: run it again to update it. Measured costs are kept while the project is open.
After running
- Query execution: the Results tab shows the bytes processed and the cost; Job Info shows the bytes processed and billed, the estimated cost and the slot time.
- Workflow runs: the Summary of each action shows its BigQuery job with its bytes and cost, and the Workflow invocation shows the bytes processed and billed and the estimated cost of the whole run.
Costs after a run are computed from the bytes billed, so they include BigQuery’s minimum billing. Estimates come from the bytes a dry run reports, priced at no less than BigQuery’s 10 MB minimum for a query that reads a table; the tooltip says when the minimum applies. BigQuery can also bill 10 MB for each table a query reads, so a query on several small tables can cost more than its estimate.
A query served from the BigQuery cache is not billed: its header shows cache hit, and Job Info shows 0 B billed.
Settings
Costs are set up in Settings ▸ Tools ▸ Dataform ▸ BigQuery cost:
| Setting | Description |
|---|---|
| Show estimated cost in the compiled query preview | Turns the estimates of the preview on or off. |
| List price from Google Cloud Billing, per query location | The on-demand price of each location, read from the Google Cloud Billing catalog. Excludes the 1 TiB monthly free tier and contract discounts. |
| Fixed price … per TiB, every location | One price for every location, for example a negotiated rate. |
| Capacity pricing (reservations) | Shows bytes only, without a price, for projects billed by slot reservations. Jobs that report a reservation are always shown this way. |
| Currency | The currency of the prices. |
The line below shows how many locations the price list covers and when it was last updated; Refresh loads it again.
Prices are estimates for information only; your Google Cloud bill is the reference.