问题
I am testing BigQuery tables and I saw that I can modify the maximumBillingTier in order to require a large amount of resources to process per byte of source data but it is not clear to me how can I modify this filed.
Can you show an example? how can I modify this field?
It is possible to change this value per query? as mentioned here
Can I also change in on WEB UI? I found no document showing how can this be accomplished
回答1:
To run the query at a higher pricing tier, pass a new value for maximumBillingTier
configuration.query.maximumBillingTier
as part of the query request, the same way as you pass other properties https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.query
like below for example
configuration.query.createDisposition or configuration.query.allowLargeResults
Please note: The maximumBillingTier is a positive integer that serves as a multiplier of the basic price of $5 per TB. see more at
https://cloud.google.com/bigquery/pricing#high-compute
if you want to make it from within bq command line -
USAGE: bq.py [--global_flags] <command> [--command_flags] [args]
try to play with below global flag
--job_property: Additional key-value pairs to include in the properties field of the job configuration; repeat this option to specify a list of values
回答2:
The bq.py command line client does not yet expose a flag to set the maximumBillingTier
for a query. This is in the works so look for an update soon.
来源:https://stackoverflow.com/questions/34526271/how-can-i-change-maximumbillingtier