public class 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
.
Static Methods
create()
public static RemoteBigQueryHelper create()
Creates a RemoteBigQueryHelper
object using default project id and authentication
credentials.
Type | Description |
RemoteBigQueryHelper |
create(String projectId, InputStream keyStream)
public static RemoteBigQueryHelper create(String projectId, InputStream keyStream)
Creates a RemoteBigQueryHelper
object for the given project id and JSON key input
stream.
Name | Description |
projectId | String id of the project to be used for running the tests |
keyStream | InputStream input stream for a JSON key |
Type | Description |
RemoteBigQueryHelper | A |
Type | Description |
RemoteBigQueryHelper.BigQueryHelperException | if |
forceDelete(BigQuery bigquery, String dataset)
public static boolean forceDelete(BigQuery bigquery, String dataset)
Deletes a dataset, even if non-empty.
Name | Description |
bigquery | BigQuery the BigQuery service to be used to issue the delete request |
dataset | String the dataset to be deleted |
Type | Description |
boolean |
|
generateDatasetName()
public static String generateDatasetName()
Returns a dataset name generated using a random UUID.
Type | Description |
String |
generateModelName()
public static String generateModelName()
Type | Description |
String |
generateRoutineName()
public static String generateRoutineName()
Type | Description |
String |
Methods
getOptions()
public BigQueryOptions getOptions()
Returns a BigQueryOptions object to be used for testing.
Type | Description |
BigQueryOptions |