Class RemoteBigQueryHelper (2.55.2)

publicclass RemoteBigQueryHelper

Utility to create a remote BigQuery configuration for testing. BigQuery options can be obtained via the #getOptions() method. Returned options have custom BigQueryOptions#getRetrySettings(): RetrySettings#getMaxAttempts() is 10, RetrySettings#getMaxRetryDelay() is 30000, RetrySettings#getTotalTimeout() is 120000 and RetrySettings#getInitialRetryDelay() is 250. HttpTransportOptions#getConnectTimeout() and HttpTransportOptions#getReadTimeout() are both set to 60000.

Inheritance

java.lang.Object > RemoteBigQueryHelper

Static Methods

create()

publicstaticRemoteBigQueryHelpercreate()

Creates a RemoteBigQueryHelper object using default project id and authentication credentials.

Returns
Type Description
RemoteBigQueryHelper

create(String projectId, InputStream keyStream)

publicstaticRemoteBigQueryHelpercreate(StringprojectId,InputStreamkeyStream)

Creates a RemoteBigQueryHelper object for the given project id and JSON key input stream.

Parameters
Name Description
projectId String

id of the project to be used for running the tests

keyStream InputStream

input stream for a JSON key

Returns
Type Description
RemoteBigQueryHelper

A RemoteBigQueryHelper object for the provided options

Exceptions
Type Description
RemoteBigQueryHelper.BigQueryHelperException

if keyStream is not a valid JSON key stream

forceDelete(BigQuery bigquery, String dataset)

publicstaticbooleanforceDelete(BigQuerybigquery,Stringdataset)

Deletes a dataset, even if non-empty.

Parameters
Name Description
bigquery BigQuery

the BigQuery service to be used to issue the delete request

dataset String

the dataset to be deleted

Returns
Type Description
boolean

true if deletion succeeded, false if the dataset was not found

generateDatasetName()

publicstaticStringgenerateDatasetName()

Returns a dataset name generated using a random UUID.

Returns
Type Description
String

generateModelName()

publicstaticStringgenerateModelName()
Returns
Type Description
String

generateRoutineName()

publicstaticStringgenerateRoutineName()
Returns
Type Description
String

Methods

getOptions()

publicBigQueryOptionsgetOptions()

Returns a BigQueryOptions object to be used for testing.

Returns
Type Description
BigQueryOptions

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.