bigquery-basics

Manages BigQuery datasets, tables, and jobs using CLI, client libraries, and Terraform.

Updated Dec 9, 2025
One-click install
npx skills add https://github.com/Aki2022/skills --skill bigquery-basics-aki2022
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bigquery-basics
Source: https://github.com/Aki2022/skills/tree/main/bigquery-basics
Command: npx skills add https://github.com/Aki2022/skills --skill bigquery-basics-aki2022

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Working with BigQuery requires knowing the right commands, APIs, and configuration patterns across many tools. This Skill consolidates the essential workflows for managing datasets, tables, and jobs so you can run queries, load data, and configure resources without searching through scattered documentation. ## Core Features & Use Cases - Resource Management: Create datasets and tables, load data from Cloud Storage, stream inserts, and manage jobs using the bq CLI. - Multi-Language Client Access: Run queries from Python, Java, Node.js, or Go using official Google Cloud client libraries, plus pandas-style analysis with BigQuery DataFrames. - Infrastructure & Security: Provision BigQuery resources with Terraform and apply IAM best practices including column-level security, row access policies, and CMEK encryption. - Use Case: A data engineer needs to set up a new analytics pipeline. They use this Skill to create a dataset and partitioned table via Terraform, load CSV data from Cloud Storage with bq load, and validate results with a SQL query. ## Quick Start Ask the assistant to create a BigQuery dataset named my_dataset in the US location and run a sample query against a public dataset.

Frequently Asked Questions about bigquery-basics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a BigQuery dataset and table from the command line?

Use bq mk --dataset --location=US my_dataset to create a dataset, then bq mk --table my_dataset.my_table schema.json to create a table from a JSON schema file. Enable the BigQuery API first with gcloud services enable bigquery.googleapis.com.

How do I run a SQL query in BigQuery using Python?

Install google-cloud-bigquery with pip, create a bigquery.Client(), and call client.query() with your SQL string. The query_job.result() method returns the rows once the job completes.

Can I manage BigQuery resources with Terraform?

Yes, the Google Cloud Terraform provider supports BigQuery datasets, tables, jobs, and reservations. Use google_bigquery_dataset and google_bigquery_table resources to define schemas, partitioning, and expiration policies declaratively.

What are the limitations of the BigQuery MCP execute_sql tool?

The execute_sql tool only allows SELECT statements; INSERT, UPDATE, DELETE, and stored procedures are rejected. Queries may still have side effects through remote functions or Python UDFs, and all queries carry a goog-mcp-server label.

How do I restrict access to sensitive columns in BigQuery?

Use column-level security with policy tags to restrict sensitive columns, row access policies for row-level filtering, and data masking to obscure values. Follow least-privilege IAM by granting roles at the most granular resource level.