Google-cloud-java: "maximumBillingTier" missing in BigQuery

Created on 27 Apr 2017  路  9Comments  路  Source: googleapis/google-cloud-java

The Java client library is missing the maximumBillingTier from the BigQuery rest API. There's no way in the SDK to set it on a per-query level for a query job configuration.

See here --> http://stackoverflow.com/questions/43647678/where-is-the-option-to-set-the-bigquery-maximum-billing-tier-in-the-new-java-sdk

And here --> https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.query.maximumBillingTier

It's available in the Python SDK, but not in the Java one. We need to be able to set this at a query level - we do not want to set it project wide.

The only workaround I see to this, is rolling back to the old version of the Java libs (the old version does expose/provide it), which is obviously a massive headache for us.

bigquery p2 feature request

All 9 comments

This parameter does not seems to be available from the BigQuery api services library so I couldn't figure out a way to pass it from here.

@garrettjonesgoogle what is the process to add this parameter from the api services library? Once there, I can work on a PR :-)

@saicheems is this just pending a refresh?

I checked, the (old) Java client library is up to date.

In the discovery file, maximumBillingTier is a property of the JobConfigurationQuery schema.

That schema's definition is here in the Google API Java client:
https://developers.google.com/resources/api-libraries/documentation/bigquery/v2/java/latest/com/google/api/services/bigquery/model/JobConfigurationQuery.html#setMaximumBillingTier(java.lang.Integer)

Is that what you're looking for? I'm not familiar with the BigQuery API itself, so please let me know if I've got the wrong context.

The nesting is Job->JobConfiguration->JobConfigurationQuery->setMaximumBillingTier

@polleyg I believe it's still missing from gcloud-java though, it'll have to be added, I was referring to the old Java client library above.

@saicheems yeah, I know. That what this issue is all about. It's in the old lib, but not the new one ;-)

@rborer - here it is in the old lib

@polleyg thanks for the link, I'll spend a bit of time to dig down in the code with this new information. Anyway, I'm being a bit confused now, is this "old lib" what is used by the BigQuery client internally?

I gave a try into #2044. If I understand the client correctly, I cannot use BigQuery.query(QueryRequest request) method but I have to use BigQuery.create(JobInfo jobInfo, JobOption... options) method so I can pass a QueryJobConfiguration instance?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

naushad97 picture naushad97  路  30Comments

sparhomenko picture sparhomenko  路  21Comments

fmatar picture fmatar  路  23Comments

codemoped picture codemoped  路  36Comments

fkorotkov picture fkorotkov  路  26Comments