I am trying to connect to Neptune using Python from EC2 instance.
Python code:
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()
rather than executing gremlin query . its giving output as it is
output:
[['V'], ['has', 'system.tenantId', 'sample_tenantId'], ['count']]
question: why its not taking gremlin query?
Please note: Connection is proper and I got output as mentioned in the link: https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-python.html
output: [v[sample_RETURN_D_H], v[sample_IND]]