使用Gremlin访问Neptune中的命名图 [英] Access Named Graph in Neptune with Gremlin

查看:125
本文介绍了使用Gremlin访问Neptune中的命名图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Neptune数据库集群中保存几个图.

I need to save several Graphs in Neptune DB cluster.

命名图是Neptune

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.

  1. 如果您的用例对RDF模型有意义,则可以使用具有命名图支持的模型
  2. 如果需要使用属性图模型,则可以使用克里姆林宫分区策略,将您的单个图表划分为多个不同的图表
  3. 如果以上两个选项都不起作用,则可能需要使用多个群集,每个图一个.
  1. If your use case makes sense for an RDF model you can use that model which has Named Graph support
  2. 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
  3. When neither of the above options work, then you may need to potentially use multiple clusters, one for each graph.

这篇关于使用Gremlin访问Neptune中的命名图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆