是否可以将图形查询(Gremlin 或 SPARQL)的输出可视化为 Amazon Neptune 中的节点和边?

Is it possible to visualize the output of a graph query (Gremlin or SPARQL) as nodes and edges in Amazon Neptune?

GREMLIN 和 SPARQL 仅为图查询定义 APIs。我如何使用 API 响应并将其绘制为具有边和顶点的实际图形?是否有类似 MySQL Workbench 的图表?

UPDATE: As of Nov 2019, Neptune launched Workbench, which is a Jupyter based visualization for Gremlin and SPARQL.

UPDATE: As of Aug 2020, Neptune Workbench extended support for visualizing graph data as nodes and edges in addition to tabular representation that was previously supported.

https://aws.amazon.com/about-aws/whats-new/2019/12/amazon-neptune-workbench-provides-in-console-experience-to-query-your-graph/

https://aws.amazon.com/about-aws/whats-new/2020/08/amazon-neptune-announces-graph-visualization-in-neptune-workbench/

Neptune Workbench 基本上是一个 Sagemaker 实例,预配置了扩展以帮助执行 Gremlin 和 SPARQL 查询,以及其他 Neptune API,如 /loader/status 等。您可以轻松地从 Neptune 控制台创建这些笔记本。除了笔记本产生的 Sagemaker 成本外,workbench 没有额外费用。这些笔记本确实支持启动和停止 API,因此您可以仅在需要时启用它们。

最近的博客 post 向您介绍了一些功能:https://aws.amazon.com/blogs/database/visualize-query-results-using-the-amazon-neptune-workbench/

SPARQL: 格林林:

AWS Neptune 没有任何内置的可视化工具。上面提到的工具可以工作,但是是商业的并且需要一些设置。这是我使用 Gremlin 的方法。

g.V() // returns list of vertices
g.E() // returns list of edges

形成这两个查询的输出以创建一个位于 DOT format and the visualize using the graphviz application or with javascript.

中的字符串

这是我创建的用于可视化 gremlin 查询的工具(例如 neo4j 的可视化方式)。 你应该执行一个查询来获取一组节点,它会告诉你这些节点是如何连接的。您可以执行多个查询,结果将添加到现有图表中,直到您清除该图表。您也可以点击node/edge查看属性或遍历in/out。搏一搏!

https://github.com/prabushitha/gremlin-visualizer

您现在可以使用 Neptune Workbench 通过 Gremlin 或 SPARQL 查询可视化图形。

https://aws.amazon.com/about-aws/whats-new/2020/08/amazon-neptune-announces-graph-visualization-in-neptune-workbench/