Shows the structure of any BigQuery table, including column names, data types, and metadata.
Run a SELECT against INFORMATION_SCHEMA.COLUMNS
. It returns one row per column with name, type, nullability, default, and description. No UI clicks needed.
Every dataset exposes a virtual view that stores column metadata. Query it like a normal table, filtering by table_name
to narrow results.
SELECT column_name, data_type FROM `acme_ecom.analytics.INFORMATION_SCHEMA.COLUMNS` WHERE table_name = 'Customers';
Use bq show --schema --format=prettyjson project:dataset.table
. The command returns a JSON array you can parse with jq
or pipe into scripts.
CLI output integrates neatly with CI/CD pipelines, documentation generators, and migration checks without needing a BigQuery session.
Yes. Join INFORMATION_SCHEMA.COLUMNS
with __TABLES_SUMMARY__
to correlate structure and size in one query.
WITH row_counts AS (SELECT table_name, row_count FROM `region-us`.acme_ecom.__TABLES_SUMMARY__ )SELECT c.table_name, c.column_name, c.data_type, r.row_countFROM `acme_ecom.analytics.INFORMATION_SCHEMA.COLUMNS` AS cLEFT JOIN row_counts AS r USING(table_name)ORDER BY c.table_name, c.ordinal_position;
Always reference the correct region (e.g., region-us
). Store reusable queries in Galaxy Collections so team members avoid copy-paste errors.
Missing backticks: Omitting backticks around fully-qualified names triggers unqualified identifier errors. Quote every layer: `project.dataset.table`
.
Wrong region: The default INFORMATION_SCHEMA may return no rows for regional datasets. Prefix with the dataset region, such as region-us
.
Yes. Remove the WHERE table_name = 'X'
filter to list columns for every table, then order by table_name
.
It does if descriptions are set. They appear in the description
column, making it easy to audit documentation coverage.
No. INFORMATION_SCHEMA queries read metadata, not table data, so they complete instantly and incur no query charges.