Reputation: 12818
In the BigQuery Console under Details I can see how much data of a BigQuery table is in Active Storage and how much in Long Term Storage.
How can I get this metadata via SQL?
Upvotes: 0
Views: 958
Reputation: 12818
This can be done with INFORMATION_SCHEMA.PARTITIONS
:
SELECT *
FROM <project_id>.<dataset_id>.INFORMATION_SCHEMA.PARTITIONS
More info can be found here:
https://cloud.google.com/bigquery/docs/information-schema-tables#partitions_view
Upvotes: 2