【发布时间】:2019-08-14 20:26:29
【问题描述】:
我正在学习本教程:
https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-python.html
如何添加节点然后检索相同的节点?
from __future__ import print_function # Python 2/3 compatibility
from gremlin_python import statics
from gremlin_python.structure.graph import Graph
from gremlin_python.process.graph_traversal import __
from gremlin_python.process.strategies import *
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
graph = Graph()
remoteConn = DriverRemoteConnection('wss://your-neptune-endpoint:8182/gremlin','g')
g = graph.traversal().withRemote(remoteConn)
print(g.V().limit(2).toList())
remoteConn.close()
上面现在所做的只是检索 2 个节点,对吗?
【问题讨论】:
-
问题不清楚。您是否设法连接到 Neptune 并运行查询?如果没有,您能否提供有关您收到的错误消息的更多信息。
标签: amazon-neptune