Neptune Database Graph Store
Topics
Section titled “Topics”Overview
Section titled “Overview”You can use Amazon Neptune Database as a graph store. The lexical-graph requires Neptune engine version 1.4.1.0 or later.
Creating a Neptune Database graph store
Section titled “Creating a Neptune Database graph store”Use the GraphStoreFactory.for_graph_store() static factory method to create an instance of a Neptune Database graph store.
To create a Neptune Database graph store (engine version 1.4.1.0 or later), supply a connection string that begins neptune-db://, followed by an endpoint:
from graphrag_toolkit.lexical_graph.storage import GraphStoreFactory
neptune_connection_info = 'neptune-db://mydbcluster.cluster-123456789012.us-east-1.neptune.amazonaws.com:8182'
with GraphStoreFactory.for_graph_store(neptune_connection_info) as graph_store: ...Connecting to Neptune via a proxy
Section titled “Connecting to Neptune via a proxy”To connect to Neptune via a proxy (e.g. a load balancer), you must supply a config dictionary to the GraphStoreFactory.for_graph_store() factory method, with a proxies dictionary of proxy servers to use by protocol or endpoint:
from graphrag_toolkit.lexical_graph.storage import GraphStoreFactory
neptune_connection_info = 'neptune-db://mydbcluster.cluster-123456789012.us-east-1.neptune.amazonaws.com:8182'
config = { 'proxies': { 'http': 'http://proxy-hostname:80' }}
with GraphStoreFactory.for_graph_store( neptune_connection_info, config=config ) as graph_store: ...