Awesome-claude-skills-cn googlebigquery-automation
通过 Rube MCP(Composio)自动化 Google BigQuery 任务:运行 SQL 查询、探索数据集和元数据、通过 Metabase 集成执行 MBQL 查询。始终先搜索工具以获取当前架构。
install
source · Clone the upstream repo
git clone https://github.com/Athe1st3154/awesome-claude-skills-cn
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Athe1st3154/awesome-claude-skills-cn "$T" && mkdir -p ~/.claude/skills && cp -r "$T/composio-skills/googlebigquery-automation" ~/.claude/skills/athe1st3154-awesome-claude-skills-cn-googlebigquery-automation && rm -rf "$T"
manifest:
composio-skills/googlebigquery-automation/SKILL.mdsource content
Google BigQuery Automation via Rube MCP
Run SQL queries, explore database schemas, and analyze datasets through the Metabase integration using Rube MCP (Composio).
工具包文档: composio.dev/toolkits/googlebigquery
前提条件
- Rube MCP 必须已连接(RUBE_SEARCH_TOOLS 可用)
- Active connection via
使用工具包RUBE_MANAGE_CONNECTIONSmetabase - A Metabase instance connected to your BigQuery data source
- 始终首先调用
获取当前工具架构RUBE_SEARCH_TOOLS
设置
获取 Rube MCP: 在客户端配置中添加
https://rube.app/mcp 作为 MCP 服务器。 无需 API 密钥 — 只需添加端点即可使用。
- 通过确认
响应来验证 Rube MCP 可用RUBE_SEARCH_TOOLS - 使用工具包
调用metabaseRUBE_MANAGE_CONNECTIONS - 如果连接不是 ACTIVE 状态,按照返回的授权链接完成设置
- 在运行任何工作流程前确认连接状态显示为 ACTIVE
Note: BigQuery data is accessed through Metabase, a business intelligence tool that connects to BigQuery as a data source. The tools below execute queries and retrieve metadata through Metabase's API.
Core Workflows
1. Run a Native SQL Query
Use
METABASE_POST_API_DATASET with type native to execute raw SQL queries against your BigQuery database.
Tool: METABASE_POST_API_DATASET Parameters: - database (required): Metabase database ID (integer) - type (required): "native" for SQL queries - native (required): Object with "query" string - query: Raw SQL string (e.g., "SELECT * FROM users LIMIT 10") - template_tags: Parameterized query variables (optional) - constraints: { "max-results": 1000 } (optional)
2. Run a Structured MBQL Query
Use
METABASE_POST_API_DATASET with type query for Metabase Query Language queries with built-in aggregation and filtering.
Tool: METABASE_POST_API_DATASET Parameters: - database (required): Metabase database ID - type (required): "query" for MBQL - query (required): Object with: - source-table: Table ID (integer) - aggregation: e.g., [["count"]] or [["sum", ["field", 5, null]]] - breakout: Group-by fields - filter: Filter conditions - limit: Max rows - order-by: Sort fields
3. Get Query Metadata
Use
METABASE_POST_API_DATASET_QUERY_METADATA to retrieve metadata about databases, tables, and fields available for querying.
Tool: METABASE_POST_API_DATASET_QUERY_METADATA Parameters: - database (required): Metabase database ID - type (required): "query" or "native" - query (required): Query object (e.g., {"source-table": 1})
4. Convert Query to Native SQL
Use
METABASE_POST_API_DATASET_NATIVE to convert an MBQL query into its native SQL representation.
Tool: METABASE_POST_API_DATASET_NATIVE Parameters: - database (required): Metabase database ID - type (required): "native" - native (required): Object with "query" and optional "template_tags" - parameters: Query parameter values (optional)
5. List Available Databases
Use
METABASE_GET_API_DATABASE to discover all database connections configured in Metabase.
Tool: METABASE_GET_API_DATABASE Description: Retrieves a list of all Database instances configured in Metabase. Note: Call RUBE_SEARCH_TOOLS to get the full schema for this tool.
6. Get Database Schema Metadata
Use
METABASE_GET_API_DATABASE_ID_METADATA to retrieve complete table and field information for a specific database.
Tool: METABASE_GET_API_DATABASE_ID_METADATA Description: Retrieves complete metadata for a specific database including all tables and fields. Note: Call RUBE_SEARCH_TOOLS to get the full schema for this tool.
Common Patterns
- Discover then query: Use
to find database IDs, thenMETABASE_GET_API_DATABASE
to explore tables and fields, thenMETABASE_GET_API_DATABASE_ID_METADATA
to run queries.METABASE_POST_API_DATASET - SQL-first approach: Use
withMETABASE_POST_API_DATASET
and write standard SQL queries for maximum flexibility.type: "native" - Parameterized queries: Use
in native queries for safe parameterization (e.g.,template_tags
).SELECT * FROM users WHERE id = {{user_id}} - Schema exploration: Use
to understand table structures before building complex queries.METABASE_POST_API_DATASET_QUERY_METADATA - Get parameter values: Use
to retrieve possible values for filter dropdowns.METABASE_POST_API_DATASET_PARAMETER_VALUES
已知陷阱
- The
parameter is a Metabase-internal integer ID, not the BigQuery project or dataset name. Usedatabase
to find valid database IDs first.METABASE_GET_API_DATABASE
in MBQL queries is also a Metabase-internal integer, not the BigQuery table name. Discover table IDs via metadata tools.source-table- Native SQL queries use BigQuery SQL dialect (Standard SQL). Ensure your syntax is BigQuery-compatible.
in constraints defaults can limit returned rows. Set explicitly for large result sets.max-results- Responses from
contain results nested underMETABASE_POST_API_DATASET
-- parse carefully as the structure may be deeply nested.data - Metabase field IDs used in MBQL
,aggregation
, andbreakout
arrays must be integers obtained from metadata responses.filter
快速参考
| Action | Tool | Key Parameters |
|---|---|---|
| Run SQL query | | , , |
| Run MBQL query | | , , |
| Get query metadata | | , , |
| Convert to SQL | | , , |
| Get parameter values | | , |
| List databases | | (see full schema via RUBE_SEARCH_TOOLS) |
| Get database metadata | | (see full schema via RUBE_SEARCH_TOOLS) |
由 Composio 提供支持