Reputation: 11
I am trying to run a script in bigquery where I find the size of all databases in a given project.
Upvotes: 1
Views: 268
Reputation: 12254
Consider INFORMATION_SCHEMA.TABLE_STORAGE
view.
SELECT project_id, table_schema, SUM(total_logical_bytes) AS total_logical_bytes
FROM `region-asia-northeast3`.INFORMATION_SCHEMA.TABLE_STORAGE
GROUP BY 1, 2 ORDER BY 3 DESC
;
output:
Upvotes: 2