【发布时间】:2021-12-07 13:10:31
【问题描述】:
我正在尝试使用 Python 从 EC2 实例连接到 Neptune。
Python 代码:
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://my_end_point:8182/gremlin','g')
g = graph.traversal().withRemote(remoteConn)
print(g.V().has("system.tenantId", "sample_tenantId").count())
remoteConn.close()
而不是执行 gremlin 查询。它按原样给出输出
输出:
[['V'], ['has', 'system.tenantId', 'sample_tenantId'], ['count']]
问题:为什么它不接受 gremlin 查询?
请注意: 连接正确,我得到了链接中提到的输出:https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-python.html
output: [v[sample_RETURN_D_H], v[sample_IND]]
【问题讨论】:
标签: python amazon-web-services gremlin amazon-neptune