Introduction to BigQuery Graph
BigQuery Graph lets you use the analytical power of BigQuery to perform graph analysis on a large scale. When you model your data as a graph with nodes and edges, you can use Graph Query Language (GQL) to find complex, hidden relationships between data points that would be challenging to find using SQL.
You can create node and edge tables directly from tables that store entities and relationships between entities. You don't need to modify your existing workflows or replicate your data to use it in graph queries.
BigQuery Graph supports a graph query interface compatible with the ISO GQL standard and the ISO Property Graph Queries (SQL/PGQ) standard . This provides you with interoperability between relational and graph models by combining well-established SQL capabilities with the expressiveness of graph pattern matching.
Benefits of BigQuery Graph
Graphs are a natural way to represent relationships in data. Graph databases are used for fraud detection, recommendations, community detection, knowledge graphs, customer profiles, data cataloging, and lineage tracking.
When your graph data is represented as tables, you must perform self joins or recursive joins to traverse your data. Expressing graph traversal logic in SQL leads to complex queries that are difficult to write, maintain, and debug. BigQuery Graph lets you navigate relationships and identify patterns in your graph data in a more intuitive way.
Key capabilities
-
Built-in graph experience. The ISO GQL interface offers a familiar, purpose-built graph experience that's based on open standards.
-
Unified relational and graph. Full interoperability between graph queries and SQL breaks down data silos and lets you choose the optimal tool for each use case, without any operational overhead to extract, transform, and load (ETL).
-
Built-in search capabilities. Rich vector and full-text search capabilities integrate with graph, letting you use semantic meaning and keywords in graph analysis.
-
Graph visualization. Graph query results are displayed in a visually appealing graph format that makes data exploration, investigation, and explanation much easier.
-
Performance and scalability. Graph workloads are powered by BigQuery's scalable, cost-effective and distributed analytics engine.
-
Integration with Spanner Graph. BigQuery Graph and Spanner Graph share the same graph schema and query language. You can execute operational graph workloads in Spanner and run complex graph analytics in BigQuery without needing to remodel your data or translate your queries.
Use cases
You can use BigQuery Graph to build many types of analytic graph workloads, including the following:
-
Financial fraud detection. Analyze complex relationships among users, accounts, and transactions to identify suspicious patterns and anomalies, such as money laundering and irregular connections between entities, which can be difficult to detect using relational databases. For a tutorial about fraud detection, see Fraud detection with BigQuery Graph .
-
Customer profiles. Track customer relationships, preferences, and purchase histories. Gain a holistic understanding of each customer to enable personalized recommendations, targeted marketing campaigns, and improved customer service experiences. For a tutorial about customer profiles, see Build customer 360 recommendations with BigQuery Graph .
-
Social networks. Capture user activities and interactions and use graph pattern matching for friend recommendations and content discovery.
-
Manufacturing and supply chain management. Use graph patterns for efficient impact analysis, cost rollups, and compliance checks by modeling parts, suppliers, orders, availability, and defects in the graph. For a tutorial about supply chains, see Supply chain traceability with BigQuery Graph .
-
Health care. Capture patient relationships, conditions, diagnosis, and treatments to facilitate patient similarity analysis and treatment planning.
-
Transportation. Model places, connections, distances, and costs in the graph, and then use graph queries to find the optimal route.
Pricing
BigQuery Graph uses the standard BigQuery capacity-based pricing model to ensure that you only pay for what you use across compute and storage.
Compute
To use BigQuery Graph, you must have a reservation that uses the Enterprise or Enterprise Plus edition . Graph queries use BigQuery capacity compute pricing measured in slots.
Storage
You are charged only once for the storage of the underlying tables used to define your graphs. Storage costs follow the standard BigQuery storage pricing (active or long-term storage), regardless of how many graph models are built on top of those tables.
What's next
- Learn how to create and query a property graph .
- Learn about graph schemas .
- Learn how to write graph queries .
- Learn how to visualize graphs .
- Learn about the differences between BigQuery Graph and Spanner Graph .
- Learn about the Graph Query Language (GQL) .

