Open
Conversation
Signed-off-by: Sagar-Mondal <sagarandshiva@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new exporter that enables direct ingestion of extracted knowledge graphs into a live Neo4j database. It integrates the official
neo4jPython driver to efficiently populate nodes and relationships, streamlining the workflow from document extraction to persistent graph storage.Key Changes
1. New Database Client
docling_graph/db_clients/neo4j_client.py: Implements theNeo4jExporterclass.mergeandcreatewrite strategies.docling_graph/db_clients/__init__.py: Exposes the new exporter for import.2. Configuration Updates
docling_graph/config.py:Neo4jConfigmodel to validate connection parameters (uri,username,password,database,batch_size).PipelineConfigto include theneo4jconfiguration section.export_formatvalidation to accept"neo4j".3. Pipeline Integration
docling_graph/pipeline.py:Neo4jExporterinto the main execution flow.export_format="neo4j"is selected.4. Dependencies
pyproject.toml: Addedneo4jto the project dependencies.Motivation
Previously, users had to export to CSV or Cypher scripts and manually load them into Neo4j. This feature enables:
How to Test
bolt://localhost:7687).