Skip to content

Feature/schema from existing graph #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

stellasia
Copy link
Contributor

@stellasia stellasia commented Jun 10, 2025

Description

This PR adds a new component: SchemaFromExistingGraphExtractor that builds ta GraphSchema object from an exiting database:

    with neo4j.GraphDatabase.driver(
        URI,
        auth=AUTH,
    ) as driver:
        extractor = SchemaFromExistingGraphExtractor(driver)
        schema: GraphSchema = await extractor.run()
        # schema.store_as_json("my_schema.json")
        print(schema)

It leverages the get_structured_schema function and transform its output into a GraphSchema object.

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation update
  • Project configuration change

Complexity

Complexity: Low

How Has This Been Tested?

  • Unit tests
  • E2E tests
  • Manual tests

Checklist

The following requirements should have been met (depending on the changes in the branch):

  • Documentation has been updated
  • Unit tests have been updated
  • E2E tests have been updated
  • Examples have been updated
  • New files have copyright header
  • CLA (https://neo4j.com/developer/cla/) has been signed
  • CHANGELOG.md updated if appropriate

@stellasia stellasia force-pushed the feature/schema-from-existing-graph branch from 4a52130 to d5d230e Compare June 11, 2025 08:42
Parses the result from get_structured_schema and returns a GraphSchema object
@stellasia stellasia force-pushed the feature/schema-from-existing-graph branch from d5d230e to 61cd172 Compare June 17, 2025 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant