googleapis / googleapis/google-cloud-go
bigquery: missing detailed physical/logical storage metrics in TableMetadata
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 1.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 109
Description
## Client
BigQuery
## Code and Dependencies
Reference: [TableMetadata struct documentation](https://pkg.go.dev/cloud.google.com/go/bigquery#TableMetadata)
## Expected behavior
The Go SDK should expose detailed storage information available in the BigQuery REST API, including physical storage metrics like `numTotalPhysicalBytes`, `numActivePhysicalBytes`, `numLongTermPhysicalBytes`, etc., especially when using `FullMetadataView`.
## Actual behavior
The Go SDK only exposes basic storage fields (`NumBytes`, `NumLongTermBytes`, `NumRows`) in the `TableMetadata` struct, even with `FullMetadataView`. The detailed physical/logical storage breakdown available in the REST API is not accessible through the SDK.
REST API provides ([documentation](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#Table)):
- `numTotalPhysicalBytes`
- `numActivePhysicalBytes`
- `numCurrentPhysicalBytes`
- `numLongTermPhysicalBytes`
- `numActiveLogicalBytes`
- `numLongTermLogicalBytes`
- `numTotalLogicalBytes`
- `numTimeTravelPhysicalBytes`
Go SDK TableMetadata only provides:
- `NumBytes`
- `NumLongTermBytes`
- `NumRows`
## Additional context
This is particularly important for datasets configured with physical storage billing, where users need access to both physical and logical storage metrics for cost analysis and optimization. The REST API provides this information, but it's not exposed through the Go SDK's `TableMetadata` struct.
Contributor guide
Assessment
This issue has not been assessed yet.