bigquery-graph

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

Updated Aug 26, 2026
One-click install
npx skills add https://github.com/Lathika-laa/Recipe_Box --skill bigquery-graph-lathika-laa
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bigquery-graph
Source: https://github.com/Lathika-laa/Recipe_Box/tree/main/.github/.gemini/skills/bigquery-graph
Command: npx skills add https://github.com/Lathika-laa/Recipe_Box --skill bigquery-graph-lathika-laa

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 like column collisions and unsupported topologies. This Skill provides the reference guidance needed to generate valid queries and DDL on the first attempt. ## Core Features & Use Cases - GQL Query Generation: Guidelines for writing BigQuery GoogleSQL GQL pattern matching, variable-length paths, path functions, and GRAPH_TABLE SQL integration, with strict rules against Cypher syntax. - Semantic Graph Querying: Rules for querying semantic graphs via the GRAPH_EXPAND TVF, including mandatory AGG() wrapping for measure columns. - Schema DDL Advisory: Best practices for CREATE PROPERTY GRAPH statements covering property scoping, PK/FK constraints, safe aliases, measures, and topology limitations. - Use Case: Ask for a query finding the shortest transfer path between two accounts, and receive a valid GQL query using ANY SHORTEST with proper label scoping 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 clause followed by MATCH patterns with node and edge labels, then RETURN the results. BigQuery supports only the GoogleSQL GQL standard, never Cypher, and recommends standalone GQL over GRAPH_TABLE unless SQL aggregation is needed.

How do I create a property graph in BigQuery?▼

Use CREATE PROPERTY GRAPH DDL with NODE TABLES and EDGE TABLES blocks mapping to existing BigQuery tables. Define KEY columns, SOURCE KEY and DESTINATION KEY references, and scope exposed columns with PROPERTIES for better performance.

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

GRAPH_TABLE integrates GQL pattern matching with standard SQL for joins and aggregations on property graphs. GRAPH_EXPAND flattens a semantic graph into a single table view for SQL analysis, requiring AGG() for measure columns.

Why does my BigQuery graph query fail with GRAPH_EXPAND?▼

GRAPH_EXPAND requires a tree-structured graph and fails on cycles, self-loops, disconnected components, or convergent diamond paths. It also fails if you select measure columns without wrapping them in the AGG() function.

Can I use Cypher queries on BigQuery property graphs?▼

No, BigQuery property graphs exclusively support the GoogleSQL GQL standard implementing ISO GQL. Cypher syntax is not supported and any graph query must be written in BigQuery GQL.

How do I query measure columns in a BigQuery semantic graph?▼

Query the semantic graph through GRAPH_EXPAND and wrap every measure column in the AGG() function, such as AGG(Order_total_amount). Measures cannot be selected directly, used with SELECT *, or referenced in native GQL queries.