Reputation: 4013
I need to save several Graphs in Neptune DB cluster.
Named Graph is smths that is supported for SPARQL format in Neptune https://docs.aws.amazon.com/neptune/latest/userguide/best-practices-sparql-graph.html
Is that possible to query that Graphs with GREMLIN?
I found only this approach https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-rest.html but no any references to ability to access Named graph. Maybe I missed some?
Upvotes: 2
Views: 1502
Reputation: 6341
When using the property graph model in Neptune you can only create a single graph. There is no direct equivalent to a Named Graph for the property graph data model.
When using Amazon Neptune you have several options for this sort of multi-graph approach.
Upvotes: 3
Reputation: 14391
If you create a named, RDF graph, using Amazon Neptune then you can only query that graph using SPARQL queries. Gremlin does not have a named graph concept but you can use a PartitionStrategy
to automatically tag graph elements (nodes, edges) as being part of some logical 'partition'. You can use this technique in Gremlin queries to essentially do what you would do with a named graph in RDF so long as you are careful that edges do not allow you to "jump" between the logical graphs.
See also: https://tinkerpop.apache.org/docs/current/reference/#_partitionstrategy
and
https://tinkerpop.apache.org/docs/current/reference/#_subgraphstrategy
Upvotes: 2