bigquery-graph

Generates GQL queries and property graph DDL for BigQuery graph analytics.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/arslan9024/White-Caves --skill bigquery-graph-arslan9024
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bigquery-graph
Source: https://github.com/arslan9024/White-Caves/tree/main/.agents/skills/bigquery_graph
Command: npx skills add https://github.com/arslan9024/White-Caves --skill bigquery-graph-arslan9024

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing correct BigQuery graph queries and property graph schemas requires deep knowledge of the GoogleSQL GQL standard, GRAPH_TABLE integration, GRAPH_EXPAND semantics, and schema design pitfalls like column collisions and unsupported topologies. This Skill encodes those rules so generated queries and DDL are syntactically correct and performant. ## Core Features & Use Cases - GQL Query Generation: Produces BigQuery GoogleSQL GQL queries with correct pattern matching, path variables, quantifiers, and output formatting (TO_JSON for visualization, plain properties for tabular results). - Semantic Graph Querying: Guides use of the GRAPH_EXPAND table-valued function and the mandatory AGG() wrapper for measure columns. - Schema DDL Advisory: Helps design CREATE PROPERTY GRAPH statements with scoped properties, safe aliases, PK/FK constraints, and measures while avoiding GRAPH_EXPAND limitations such as cycles and disconnected graphs. - Use Case: Ask for the shortest transfer path between two accounts, and receive a valid ANY SHORTEST GQL query with proper label usage and a LIMIT clause. ## Quick Start Ask the assistant to write a BigQuery GQL query that finds all accounts connected to a given person within three hops.

Frequently Asked Questions about bigquery-graph

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

FAQPage Schema
How do I write a graph query in BigQuery using GQL?▼

Use the GRAPH clause followed by MATCH patterns with node and edge labels, then RETURN the results. BigQuery supports only the GoogleSQL GQL standard, never Cypher, and path traversals should bind patterns to path variables like MATCH p = (a)-[e]->(b).

How do I query a semantic graph in BigQuery?▼

Query semantic graphs with the GRAPH_EXPAND table-valued function, passing the full graph name as a string. Never query the graph as a regular table, and wrap measure columns in the AGG() function instead of standard aggregations like SUM or COUNT.

When should I use GRAPH_TABLE instead of standalone GQL?▼

Use GRAPH_TABLE only when you need SQL integration such as aggregations, joins with relational tables, or advanced filtering on graph results. For pure graph pattern matching, prefer standalone GQL with native RETURN statements.

What graph structures does GRAPH_EXPAND support?▼

GRAPH_EXPAND requires a tree structure and rejects cyclic graphs, self-loops, disconnected components, and convergent diamond paths. For such topologies, use standard GQL pattern matching or split the graph into separate GRAPH_EXPAND calls.

Why does my BigQuery graph query fail with a measure column error?▼

Measure columns cannot be selected directly or used in native GQL queries. Wrap them in the AGG() function within a GRAPH_EXPAND query, and avoid SELECT * since it implicitly includes measures.

How do I avoid column name collisions in BigQuery graph schemas?▼

GRAPH_EXPAND prefixes properties with node or edge aliases, so combinations like node N with property a_b and node N_a with property b collide. Use distinct safe aliases with AS and design property names to prevent prefix-induced duplicates.