-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
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):
numTotalPhysicalBytesnumActivePhysicalBytesnumCurrentPhysicalBytesnumLongTermPhysicalBytesnumActiveLogicalBytesnumLongTermLogicalBytesnumTotalLogicalBytesnumTimeTravelPhysicalBytes
Go SDK TableMetadata only provides:
NumBytesNumLongTermBytesNumRows
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.