use of com.google.cloud.bigquery.Dataset.Builder in project google-cloud-java by GoogleCloudPlatform.
the class ITDatasetSnippets method testReload.
@Test
public void testReload() {
assertNull(dataset.getFriendlyName());
Builder builder = dataset.toBuilder();
builder.setFriendlyName(FRIENDLY_NAME);
builder.build().update();
Dataset reloadedDataset = datasetSnippets.reloadDataset();
assertEquals(FRIENDLY_NAME, reloadedDataset.getFriendlyName());
}
use of com.google.cloud.bigquery.Dataset.Builder in project google-cloud-java by GoogleCloudPlatform.
the class DatasetSnippets method updateDataset.
/**
* Example of updating a dataset.
*/
// [TARGET update(DatasetOption...)]
// [VARIABLE "my_friendly_name"]
public Dataset updateDataset(String friendlyName) {
// [START update]
Builder builder = dataset.toBuilder();
builder.setFriendlyName(friendlyName);
Dataset updatedDataset = builder.build().update();
// [END update]
return updatedDataset;
}