使用Gremlin访问Neptune中的命名图 [英] Access Named Graph in Neptune with Gremlin
问题描述
我需要在Neptune数据库集群中保存几个图.
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
是否可以使用GREMLIN查询该图 s ?
Is that possible to query that Graphs with GREMLIN?
我只发现了这种方法 https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-rest.html ,但未提及访问命名图的功能.也许我错过了一些?
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?
推荐答案
在Neptune中使用属性图模型时,您只能创建一个图.属性图数据模型没有与命名图"直接等效的内容.
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.
使用Amazon Neptune时,您可以使用多种方法来进行这种多图方法.
When using Amazon Neptune you have several options for this sort of multi-graph approach.
- 如果您的用例对RDF模型有意义,则可以使用具有命名图支持的模型
- 如果需要使用属性图模型,则可以使用克里姆林宫分区策略,将您的单个图表划分为多个不同的图表
- 如果以上两个选项都不起作用,则可能需要使用多个群集,每个图一个.
- If your use case makes sense for an RDF model you can use that model which has Named Graph support
- If you need to use the property graph model, then you can look at using something like the Gremlin Partition Strategy to partition your single graph into multiple different graphs
- When neither of the above options work, then you may need to potentially use multiple clusters, one for each graph.
这篇关于使用Gremlin访问Neptune中的命名图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!