aktonay/skillz / skills/cloud/bigquery-basics
bigquery-basics
VerifiedManages datasets, tables, and jobs in BigQuery, and integrates with BigQuery ML and Gemini for advanced data analytics and AI-driven insights. Use when you need to interact with BigQuery, run SQL queries, manage BigQuery resources, or leverage BigQuery's built-in ML capabilities. Also use when performing data analysis, ingesting data into BigQuery, or developing AI applications on BigQuery.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.6 KB |
| references/cli-usage.md | markdown | 2.0 KB |
| references/client-library-usage.md | markdown | 2.2 KB |
| references/core-concepts.md | markdown | 3.4 KB |
| references/iac-usage.md | markdown | 1.7 KB |
| references/iam-security.md | markdown | 1.9 KB |
| references/mcp-usage.md | markdown | 2.3 KB |
references/cli-usage.md
View on GitHub# BigQuery CLI Usage
The `bq` command-line tool is used to interact with BigQuery for managing
resources and running jobs.
## Basic Syntax
```bash
bq COMMAND [FLAGS] [ARGUMENTS]
```
## Essential Commands
### Dataset Management
- **Create a dataset:**
```bash
bq mk --dataset --location=us my_dataset
```
- **List datasets:**
```bash
bq ls --project_id my_project
```
### Table Management
- **Create a table from a schema file:**
```bash
bq mk --table my_dataset.my_table schema.json
```
- **Copy a table within or across datasets:**
```bash
bq cp my_dataset.my_table my_other_dataset.my_table_copy
```
- **Create a table snapshot (read-only copy):**
```bash
bq cp --snapshot --no_clobber my_dataset.my_table my_other_dataset.my_table_snapshot
```
- **Load data from Cloud Storage (CSV):**
```bash
bq load --source_format=CSV my_dataset.my_table gs://my-bucket/data.csv
```
- **Stream data into a table from a newline-delimited JSON file:**
```bash
bq insert my_dataset.my_table data.json
```
- **Delete a table:**
```bash
bq rm -f my_dataset.my_table
```
### Querying Data
- **Run a standard SQL query:**
```bash
bq query --use_legacy_sql=false \
'SELECT count(*) FROM `my_project.my_dataset.my_table`'
```
- **Run a dry run to estimate bytes processed:**
```bash
bq query --use_legacy_sql=false --dry_run \
'SELECT * FROM `my_project.my_dataset.my_table`'
```
### Job Management
- **List recent jobs:**
```bash
bq ls -j
```
- **Show job details:**
```bash
bq show -j job_id
```
- **Cancel a job:**
```bash
bq cancel job_id
```
## Global Flags
- `--location`: Specifies the geographic location for the job or resource.
- `--project_id`: Overrides the default project for the command.
- `--format`: Changes output format (e.g., `prettyjson`, `sparse`, `csv`).
For the complete BigQuery CLI reference guide, visit:
[bq command-line tool reference](https://docs.cloud.google.com/bigquery/docs/reference/bq-cli-reference).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |