see https://pypi.org/project/gremlinpython/
Gremlin-Python implements Gremlin within the Python language and can be used on any Python virtual machine including the popular CPython machine.
I'm writing Gremlin python queries on a Neptune database
I want to find all the paths between a node A and a node B.
Then I would like to write the data into a JSON format that looks like this:
{ "nodes": [
{ "id": 1, "name": "A",…
I am facing the below problem very often in AWS lambda - Neptune. using the latest version gremlinpython==3.5.1. How to fix? even in the previous version - same problem
user_available = g().V(cognito_username).hasNext()
File…
Is there any way to calculate PageRank and Shortest Path algorithm with gremlin in Amazon Neptune?
As it said in gremlin documentation PageRank centrality can be calculated with Gremlin with the pageRank()-step which is designed to work with…
I have the following lambda code to try to access Neptune from the same VPC on AWS. Which most copied from https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-python.html.
But I am getting 403 Forbidden error.
The source…
I'm running a gremlin server using the official docker container:
docker run --rm -it -p 8182:8182 --name gremlin tinkerpop/gremlin-server
I then try to run the following script from the host machine:
from gremlin_python.process.anonymous_traversal…
I think i made a mistake such a duplicate the vertices.
I have two query and responses are different.
from gremlin_python.process.traversal import P
d_o_c = graph.V().has("cid", "value", '123124').in_('o_f_d').values().toList()
c_o_d =…
I want to query a list and the query response must return to me which response of the list item.
For example:
a = [1,2,3]
graph.V().has("cid", "value", P.within(a)).in_('o_f_c').out('o_f_c').values().toList()
The response of above query…
I am getting the following error, because some of the vertexes don't have the expected property.
The property does not exist as the key has no associated value for the provided element
Query:-
get_g().V().hasLabel(search_vertex).has(T.id,…
How to write a Gremlin query when the number of input vertices is unknown?
Scenario:
1. Poll -> Already existing vertex.
2. Poll Question -> User might send multiple questions that are unknown and multiple options to the question (unknown list).
I…
I have following graph model:
I want to select user, who has performed action via the controller. The performed-by edge contains used_user_key property, that i want to use in order to select the called-by edge connected to the required user on the…
I have written a Python REST API using FastAPI. It connects to Janus Graph on a remote machine and runs some Gremlin Queries using the GremlinPython API. While writing my unit tests using FastAPI's built in test client, I cannot mock Janus Graph and…
I have setup a ssh tunnel from local machine to neptune db and established a connection using endpoint.
ssh -L 8182:***.us-east-1.neptune.amazonaws.com:8182 ****
I see gremlin console work fine and i can able to run graph query but When i attempt…
Currently i am trying to import via gremlinpython a large graph from igraph programmatically . I am rather new to gremlin and the endpoints i may use it with. The problem i currently face is that a property in a node/edge can have multiple types.…
I'm using Amazon Neptune, which does not support variables. For complex queries, however, I need to use a variable in multiple places. How can I do this without querying twice for the same data?
Here's the problem I'm trying to tackle:
Given a…