Skip to content

bigquery: missing detailed physical/logical storage metrics in TableMetadata #13365

@apgiorgi

Description

@apgiorgi

Client

BigQuery

Code and Dependencies

Reference: TableMetadata struct documentation

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):

  • 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.

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions