Reputation: 13316
Is it possible to get the costs associated with a particular query? I'm asking because I'd like to know how much a particular query costs.
Upvotes: 1
Views: 664
Reputation: 26617
You can run your queries in dry-run mode, which will tell you how many bytes your query would process were you to run it. This byte number can be directly translated into cost at $5/TB.
After you run the query, the number of bytes processed is also part of the job statistics, so you can look up how much a particular query cost.
Bytes processed is reported in the statistics.query.totalBytesProcessed
field in the job object.
Note that the BigQuery Web UI will also run a dry run query in the background before you run the query to tell you how many bytes the query would process.
Upvotes: 4
Reputation: 207830
You should install for Chrome the Streak BigQuery Developer Tools extensions
Show Cost of Each Query
Added the ability to see how much each query that you ran costs. Once the query completes, we added the cost (in US cents) next to the summary status of the query. The cost is calculated based on $0.035/GB processed.
Upvotes: 2