bigquery-graph

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

Updated Aug 16, 2026
One-click install
npx skills add https://github.com/1919114514yasenpai-maker/focus-quest --skill bigquery-graph-1919114514yasenpai-maker
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bigquery-graph
Source: https://github.com/1919114514yasenpai-maker/focus-quest/tree/main/.gemini/skills/bigquery-graph
Command: npx skills add https://github.com/1919114514yasenpai-maker/focus-quest --skill bigquery-graph-1919114514yasenpai-maker

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 GQL syntax, GRAPH_TABLE integration, GRAPH_EXPAND semantics, and schema design pitfalls. This Skill provides the guidelines and references needed to generate valid graph queries and well-formed CREATE PROPERTY GRAPH DDL without trial and error. ## Core Features & Use Cases - GQL Query Generation: Produces BigQuery GoogleSQL GQL queries with correct pattern matching, path variables, quantifiers, and output formatting for visualization or tabular results. - Semantic Graph Querying: Guides use of the GRAPH_EXPAND table-valued function and the AGG() function for measure columns in semantic graphs. - Schema DDL Advisory: Assists in writing CREATE PROPERTY GRAPH DDL with scoped properties, safe aliases, key constraints, measures, and topology validation. - Use Case: A data engineer needs to find the shortest transfer path between two accounts in a fraud detection graph. The Skill generates a GQL query using ANY SHORTEST with a quantified edge pattern and TO_JSON output for visualization. ## Quick Start Ask the assistant to write a GQL query that finds all accounts connected to a given person within three hops in your BigQuery property graph.

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 prefix with your graph name followed by MATCH patterns with node and edge labels, then RETURN the results. BigQuery supports only the GoogleSQL GQL standard, never Cypher, and path variables should be assigned for path traversal queries.

How do I create a property graph in BigQuery?▼

Use the CREATE PROPERTY GRAPH DDL statement with NODE TABLES and EDGE TABLES blocks mapping to existing BigQuery tables. Define KEY columns, SOURCE KEY and DESTINATION KEY references for edges, and scope properties explicitly rather than using PROPERTIES ALL COLUMNS.

What is the difference between GRAPH_TABLE and GRAPH_EXPAND in BigQuery?▼

GRAPH_TABLE integrates GQL pattern matching with standard SQL for aggregations and relational joins. GRAPH_EXPAND flattens a semantic graph into a single table view for SQL analysis, requiring AGG() for measure columns and a tree-structured graph topology.

Why does my BigQuery graph query fail with measure columns?▼

Measure columns cannot be selected directly and must be wrapped in the AGG() function when querying via GRAPH_EXPAND. Measures are also incompatible with native GQL queries like GRAPH_TABLE, which only operate on standard dimension properties.

What graph topologies does GRAPH_EXPAND support?▼

GRAPH_EXPAND requires the graph to form a valid tree structure. Cyclic graphs, self-loops, disconnected components with multiple roots, and convergent diamond paths are not supported and must be queried with standard GQL instead.

When should I use GRAPH_TABLE instead of standalone GQL?▼

Use GRAPH_TABLE only when you need SQL capabilities beyond graph pattern matching, such as aggregations with GROUP BY, joins with relational tables, or advanced filtering. For pure graph traversal, standalone GQL with RETURN is preferred.