BigQuery Meta Tables

#Data Warehouse #Big Query

Meta tables are very useful when it comes to get bigquery table information programmatically.

In BigQuery, there are meta tables that we can use to retrieve information about the dataset and tables.

#standardSQL
SELECT
*
FROM `homelike-bi-analysis.opportunity.__TABLES__`

You could get a list of all the tables and their

  1. creation_time
  2. last_modified_time
  3. row_count
  4. size_bytes
  5. type

Alternatively, you could get some information through

SELECT
 * EXCEPT(is_typed)
FROM
  `your_awesome_project.your_cool_dataset.INFORMATION_SCHEMA.TABLES`

These two queries return slightly different results.

Published: by ;

Lei Ma (2019). 'BigQuery Meta Tables', Datumorphism, 05 April. Available at: https://datumorphism.leima.is/til/data/bigquery-meta-tables/.

Table of Contents

Current Ref:

  • til/data/bigquery-meta-tables.md