一键导入
bigquery
Instructions for querying Google BigQuery using the bq command-line tool. Useful for running SQL queries, exploring datasets, and exporting results.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Instructions for querying Google BigQuery using the bq command-line tool. Useful for running SQL queries, exploring datasets, and exporting results.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | bigquery |
| description | Instructions for querying Google BigQuery using the bq command-line tool. Useful for running SQL queries, exploring datasets, and exporting results. |
This skill enables you to query Google BigQuery using the bq command-line tool.
Authentication is already configured. The default project is project_id.
Use the project_id_exploration dataset as scratch space for temporary tables and experimentation.
The public dataset contains tables synced from the production Postgres database.
List datasets in the current project (defaults to project_id):
bq ls
List datasets in a specific project:
bq ls --project_id=PROJECT_ID
List tables in a dataset:
bq ls PROJECT_ID:DATASET_NAME
Get table schema:
bq show --schema --format=prettyjson PROJECT_ID:DATASET_NAME.TABLE_NAME
Run a simple query:
bq query --use_legacy_sql=false 'SELECT * FROM `project.dataset.table` LIMIT 10'
Run a query with formatted output:
bq query --use_legacy_sql=false --format=prettyjson 'YOUR_QUERY'
Run a query and save to a destination table:
bq query --use_legacy_sql=false --destination_table=PROJECT:DATASET.NEW_TABLE 'YOUR_QUERY'
Run a dry run to estimate costs:
bq query --use_legacy_sql=false --dry_run 'YOUR_QUERY'
Export to CSV:
bq query --use_legacy_sql=false --format=csv 'YOUR_QUERY' > results.csv
--use_legacy_sql=false for standard SQL syntaxLIMIT clauses when exploring data to reduce costs--dry_run to estimate query costs before running expensive queries`project.dataset.table`Preview table data:
bq head -n 10 PROJECT:DATASET.TABLE
Get table info (row count, size):
bq show --format=prettyjson PROJECT:DATASET.TABLE
Query with parameters:
bq query --use_legacy_sql=false --parameter='name:STRING:value' 'SELECT * FROM `table` WHERE col = @name'