What is Spanner Graph?
Spanner Graph is a graph database capability built into Cloud Spanner. It unifies graph data with relational data, vector search, full-text search, and generative AI in a single database. Queries use the ISO-standard Graph Query Language (GQL) for pattern matching and relationship traversal. GQL and SQL are fully interoperable, so you can pick the right model per query and avoid data silos.
The core problem Spanner Graph solves is the split between specialized graph databases and transactional systems. Instead of replicating data into a separate graph system, you map existing relational tables to property graphs through a declarative schema with no data migration. You run graph queries on the same data that powers your operational workloads, and you inherit Spanner’s operational profile: single-digit-millisecond latency, near-unlimited horizontal scale, and 99.999 percent availability in multi-region configurations.
Core Features
- ISO-standard GQL with SQL interoperability: Spanner Graph offers a GQL-compatible interface for pattern matching and relationship queries. GQL and SQL work together fully, so graph and tabular data coexist in one database.
- Property graph without migration: Existing relational tables are mapped to property graphs through a declarative schema. No data migration is required.
- Unification with search and GenAI: Graph queries combine with vector search and full-text search. Through the LangChain integration, Spanner Graph supports GraphRAG workflows for AI applications.
- Managed graph algorithms at scale: Built-in algorithms for centrality, clustering, similarity, and path finding scale to tens of billions of edges through transparent sharding, with near-zero impact on transactional workloads.
Typical Use Cases
Fraud and anti-money-laundering detection: Suspicious patterns and connections between accounts, transactions, and identities surface through graph queries that are hard to express with classic relational joins.
Recommendation engines and personalization: Relationships between users, products, and interactions form the basis for recommendations. Combined with vector search, you can evaluate semantic similarity and graph structure together.
Knowledge graphs for GenAI: Spanner Graph serves as a knowledge graph for GraphRAG. Through the LangChain integration, you combine graph search with semantic similarity to supply LLM responses with relevant context.
Benefits
- Graph, relational, search, and GenAI in one database instead of several specialized systems
- No data migration: existing tables are mapped to a graph
- Spanner operational profile with high availability and near-unlimited scale, including EU regions and EU multi-region for data sovereignty
Integration with innFactory
As a certified Google Cloud Partner, innFactory supports you with the adoption and operation of this service.
Typical Use Cases
Frequently Asked Questions
What is Spanner Graph?
Spanner Graph is a graph database capability built directly into Cloud Spanner. It maps existing relational tables to property graphs without data migration and lets you query them with the ISO-standard Graph Query Language (GQL). GQL and SQL are fully interoperable, so graph and tabular data coexist in a single database.
When should I use Spanner Graph?
Spanner Graph fits use cases where relationships between entities matter: fraud and anti-money-laundering detection, recommendation engines, identity and access graphs, network and supply-chain analysis, and knowledge graphs for GenAI and GraphRAG. It is especially relevant when you need those relationships alongside transactional data and large scale.
How much does Spanner Graph cost?
Spanner Graph needs no separate license. It is included in the Spanner Enterprise and Enterprise Plus editions. Cost is driven by Spanner consumption: provisioned compute capacity and storage. There is no separate fee for the graph capability itself. Current rates are published on the Spanner pricing page.
What are the requirements and limitations of Spanner Graph?
Spanner Graph requires the Enterprise or Enterprise Plus edition and supports GoogleSQL-dialect databases only. The PostgreSQL interface is not supported. Existing relational tables are mapped to a graph through a declarative schema with no data migration.
