'How To Query INFORMATION_SCHEMA.TABLE_STORAGE_TIMELINE_BY_PROJECT in BigQuery
I am the project owner in my organization and I have the BigQuery Admin role at the organization level. How do I query INFORMATION_SCHEMA.TABLE_STORAGE_TIMELINE_BY_PROJECT?
I am using Console and following along with this documentation and just trying to view more BigQuery metadata:
SELECT * FROM `region-us`.INFORMATION_SCHEMA.TABLE_STORAGE_TIMELINE_BY_PROJECT;
Error:
Not found: Table [My Project ID]:region-us.INFORMATION_SCHEMA.TABLE_STORAGE_TIMELINE_BY_PROJECT was not found in location US
I get the same error if I include [My Project ID] in the SELECT statement.
This query does work:
SELECT * FROM `region-us`.INFORMATION_SCHEMA.SCHEMATA
Solution 1:[1]
This is because TABLE_STORAGE_TIMELINE_BY is still in Preview and not Generally Available yet.
https://cloud.google.com/bigquery/docs/information-schema-tables#table_storage_timeline_by_views
I just had the same with TABLE_STORAGE.
Solution 2:[2]
You need to specify the schema and the table, these need to be in the "us-region".
You can see this example.
SELECT
timestamp AS start_time,
table_name,
total_logical_bytes
FROM
`region-REGION`.INFORMATION_SCHEMA.TABLE_STORAGE_TIMELINE_BY_PROJECT
WHERE
table_schema = "TABLE_SCHEMA"
AND
table_name = "TABLE_NAME"
ORDER BY
start_time DESC;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sander van den Oord |
| Solution 2 | Raul Saucedo |


