9951 explained code solutions for 126 technologies


google-big-queryHow do I access the information_schema in Google BigQuery?


To access the information_schema in Google BigQuery, you can use the following query:

SELECT * FROM information_schema.tables

This query will return a list of all tables in the currently selected dataset.

The query consists of the following parts:

  1. SELECT *: This is the clause that specifies the columns that should be returned in the result set. In this case, all columns are returned.

  2. FROM information_schema.tables: This is the clause that specifies the table from which the data should be retrieved. In this case, the information_schema.tables table is used.

The output of the query will be a list of all tables in the currently selected dataset, with information about each table, such as its name, type, and creation date.

For more information about the information_schema in BigQuery, see the BigQuery documentation.

Edit this code on GitHub