com.google.api.services.bigquery.model.DatasetReference

Here are the examples of the java api class com.google.api.services.bigquery.model.DatasetReference taken from open source projects.

1. BigQueryTableRowIterator#createDataset()

View license
// Create a new BigQuery dataset
private void createDataset(String datasetId) throws IOException, InterruptedException {
    Dataset dataset = new Dataset();
    DatasetReference reference = new DatasetReference();
    reference.setProjectId(projectId);
    reference.setDatasetId(datasetId);
    dataset.setDatasetReference(reference);
    String createDatasetError = "Error when trying to create the temporary dataset " + datasetId + " in project " + projectId;
    executeWithBackOff(client.datasets().insert(projectId, dataset), createDatasetError + " :{}");
}

2. BigQueryTableRowIterator#createDataset()

View license
// Create a new BigQuery dataset
private void createDataset(String datasetId) throws IOException, InterruptedException {
    Dataset dataset = new Dataset();
    DatasetReference reference = new DatasetReference();
    reference.setProjectId(projectId);
    reference.setDatasetId(datasetId);
    dataset.setDatasetReference(reference);
    String createDatasetError = "Error when trying to create the temporary dataset " + datasetId + " in project " + projectId;
    executeWithBackOff(client.datasets().insert(projectId, dataset), createDatasetError + " :{}");
}