googleapis / googleapis/google-cloud-go
bigquery: dataset.Metadata() returns empty StorageBillingModel
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 1.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 109
Description
## Client
BigQuery
## Environment
(reproducible in multiple environments)
Go 1.25
Package: cloud.google.com/go/bigquery v1.71.0
## Code and Dependencies
```go
client, err := bigquery.NewClient(ctx, "my-project-id")
if err != nil {
log.Fatal(err)
}
dataset := client.Dataset("my_dataset")
datasetMD, err := dataset.Metadata(ctx)
if err != nil {
return nil, err
}
fmt.Printf("StorageBillingModel: %q\n", datasetMD.StorageBillingModel)
```
## Expected Behavior
dataset.Metadata(ctx) should return "LOGICAL" or "PHYSICAL", consistent with the value returned by the REST API:
```sh
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://bigquery.googleapis.com/bigquery/v2/projects//datasets/"
```
## Actual Behavior
StorageBillingModel is always an empty string (""), even though the REST API returns the correct value.
Example output:
```
StorageBillingModel: ""
```
Equivalent REST API response for the same dataset:
```
{
"id": "projects/my-project/datasets/my_dataset",
"storageBillingModel": "PHYSICAL"
}
```
## Additional context
- The field previously worked as expected.
- Appears to have stopped populating recently (reports began a few days ago).
- Confirmed that upgrading from v1.69 → v1.71 did not resolve the issue.
- No local code changes. The problem may be due to a regression in how the SDK reads dataset metadata.
Contributor guide
Assessment
This issue has not been assessed yet.