0
votes

Maybe I'm missing something obvious, but I cannot see the option/method to set the maximum billing tier in the new (and recommended) JAVA client library.

QueryJobConfiguration queryConfig =
            QueryJobConfiguration.newBuilder(sql)
                    .setUseLegacySql(false)
                    .setUseQueryCache(true)
                    .setAllowLargeResults(true)
                    .setPriority(QueryJobConfiguration.Priority.INTERACTIVE)
                    .setCreateDisposition(JobInfo.CreateDisposition.CREATE_IF_NEEDED)
                    .setWriteDisposition(writeDisposition)
                    .setDestinationTable(TableId.of(dataset, outputTable))
                    .build();

https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/QueryJobConfiguration.java

It used to be present in the old client library. I need this flag for a current project.

Has it been missed?

As a side note, I can see it in the Python SDK - https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/bigquery/google/cloud/bigquery/job.py#L898

1

1 Answers

0
votes

This has been confirmed as missing the SDK. I've raised the issue here in case others may want to track it.

There are two workarounds:

  1. Set the max billing tier project wide (this is not an option for us)
  2. Use the old client libs (huge amount of work to refactor our code for this)