Skip to content

Conversation

@mtyin
Copy link
Collaborator

@mtyin mtyin commented Jan 3, 2025

feat(graph): Extension to SpannerGraphStore

Many use cases don't have a clean pre-specified schema, hence this change adds support to generic flexible graph schema.

  1. Allow a dynamic schema for nodes and edges:
  • both nodes and edges are stored in one table with dynamic label and properties (JSON)
  1. Allow more than one (src.node.id, target.node.id, edge.type) by introducing a uuid as part of the key;
  2. Prefix the table names with graph names to avoid conflicting.
  3. Add json type support.

Fixes #<issue_number_goes_here> 🦕

- Allow a dynamic schema for nodes and edges:
  - nodes are stored in one table with dynamic label and properties (JSON)
- Allow more than one (src.node.id, target.node.id, edge.type) by
  introducing a uuid as part of the key;
- Prefix the table names with graph names to avoid conflicting.
@mtyin mtyin requested review from a team as code owners January 3, 2025 18:01
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/langchain-google-spanner-python API. label Jan 3, 2025
@mtyin mtyin changed the title feat(grah): Extension to SpannerGraphStore feat(graph): Extension to SpannerGraphStore Jan 3, 2025
@mtyin mtyin changed the title feat(graph): Extension to SpannerGraphStore feat(graph): Flexible Schema Extension to SpannerGraphStore Jan 3, 2025
Copy link
Collaborator

@amullick-git amullick-git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

mtyin and others added 2 commits January 21, 2025 17:56
Previously, we override all columns by schema;
with this change, we selectively write specified columns.

Note:
- this won't change the behavior if you always do a full blind write;
@averikitsch averikitsch merged commit 44db678 into googleapis:main Feb 7, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/langchain-google-spanner-python API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants