Skip to content

Conversation

@mtyin
Copy link
Collaborator

@mtyin mtyin commented Aug 8, 2025

This is to support dynamic schema introduced in

  • https://cloud.google.com/spanner/docs/graph/manage-schemaless-data

    DYNAMIC LABEL (<label_expr>) DYNAMIC PROPERTIES (<property_expr>) 

    allows we add labels / properties that are dynamically stored as values (as opposed
    to schema objects).

    This is useful to manage graph with schema that dynamically evolves
    (without making schema changes).

Allow graph schema to include the json fields. This is useful for QA chain to handle queries that refers to json properties. For example, for node: Company(details = Json('market_cap', ...)) graph schema will include 'market_cap' as a json_fields of `details` in the schema representation, so that when a user ask for `get market capitalization of company`, QA chain can understand which subfield to refer to. Note: - json property schema is done via by inspecting the first non-null property. - other changes: refactor the tests, improve the logging
@mtyin mtyin requested review from a team as code owners August 8, 2025 23:11
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/langchain-google-spanner-python API. label Aug 8, 2025
mtyin added 2 commits August 8, 2025 16:15
This is to support dynamic schema introduced in https://cloud.google.com/spanner/docs/graph/manage-schemaless-data ``` DYNAMIC LABEL (<label_expr>) DYNAMIC PROPERTIES (<property_expr>) ``` allows we add labels / properties that are dynamically stored as values (as opposed to schema objects). This is useful to manage graph with schema that dynamically evolves (without making schema changes).
@mtyin mtyin changed the title feat(graph): include json schema in the graph schema representation feat(graph): Support dynamic schema Aug 16, 2025
@mtyin
Copy link
Collaborator Author

mtyin commented Aug 16, 2025

/gcbrun

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.

2 participants