Skip navigation links

Package com.google.cloud.bigquery.testing

A testing helper for Google BigQuery.

See: Description

Package com.google.cloud.bigquery.testing Description

A testing helper for Google BigQuery.

A simple usage example: 1. Create a test Google Cloud project.

2. Download a JSON service account credentials file from the Google Developer's Console.

3. Create a RemoteBigQueryHelper object using your project ID and JSON key. Here is an example that uses the RemoteBigQueryHelper to create a dataset.

4. Run tests.

Before the test:


 RemoteBigQueryHelper bigqueryHelper = RemoteBigQueryHelper.create();
 BigQuery bigquery = bigqueryHelper.getOptions().getService();
 String dataset = RemoteBigQueryHelper.generateDatasetName();
 bigquery.create(DatasetInfo.newBuilder(dataset).build());
 

After the test:


 RemoteBigQueryHelper.forceDelete(bigquery, DATASET);
 
Skip navigation links

Copyright © 2023 Google LLC. All rights reserved.