The "bq show –schema" command is used in the bq CLI tool to display the schema of a specific BigQuery table.
It provides a quick overview of columns and data types, can help validate table structure before writing queries, and is useful for scripting or automating metadata checks.
The syntax is "bq show --schema [PROJECT_ID].[DATASET].[TABLE]".
If the default project is set via gcloud, the command simplifies to "bq show --schema [DATASET].[TABLE]".
It improves readability and reduces errors, especially in scripts.
An example schema command without the Project ID is "bq show --schema [DATASET].[TABLE]".
A sample schema output for a table is provided, showing column names, types, and modes.
Users can utilize tools like jq to format the output for better readability.