-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.
Description
Steps to reproduce
- Invoke BigQuery::listDatasets
- Invoking Dataset::getLocation on the response shall return null
Code example
String projectId = "bigquery-public-data";
FileInputStream stream = new FileInputStream(<creds json path>);
BigQuery bigquery =
BigQueryOptions.newBuilder()
.setCredentials(ServiceAccountCredentials.fromStream(stream))
.build()
.getService();
Page<Dataset> page = bigquery.listDatasets(projectId);
for (Dataset dataset : page.iterateAll()) {
assertThat(dataset.getLocation()).isNull();
}Any additional information below
- The field is available in the
com.google.api.services.bigquery.model.Dataset#locationhowever, it is not mapped tocom.google.cloud.bigquery.Dataset#location byHttpBigQueryRpc#LIST_TO_DATASET`
Lines 88 to 100 in 43409c9
| @InternalApi("Visible for testing") | |
| static final Function<DatasetList.Datasets, Dataset> LIST_TO_DATASET = | |
| new Function<DatasetList.Datasets, Dataset>() { | |
| @Override | |
| public Dataset apply(DatasetList.Datasets datasetPb) { | |
| return new Dataset() | |
| .setDatasetReference(datasetPb.getDatasetReference()) | |
| .setFriendlyName(datasetPb.getFriendlyName()) | |
| .setId(datasetPb.getId()) | |
| .setKind(datasetPb.getKind()) | |
| .setLabels(datasetPb.getLabels()); | |
| } | |
| }; |
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.