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 am trying to create a graph where i can find all relationships with given person and list of their friends.
the problem statement my graph looks like this
bob ->friends -> jay
jay -> friends -> mack
jay -> friends - > john
mack -> friends ->…
In AWS Neptune, I have a graph that has many clusters like the one defined below:
g.addV('person').property('name', 'John').as('p1')
.addV('person').property('name', 'Weihua').as('p2')
.addV('Fellowship of the Ring').as('movie1')
.addV('A New…
I have a module that manages Azure Cosmosdb Gremlin queries. When I call it from jupyter notebooks like this, it works fine. However, when calling it from the Django app I get a ConnectionError:
Cannot connect to host…
So, imagine a simple graph for a social network, where you have profile nodes and post nodes. Profiles can follow other profiles, and profiles can also watch, like and publish posts. So overall, 4 types of edges.
Then, given a target_profile and a…
I have files stored in EFS. I want to upload the files to Neptune. I came across many references where files are uploaded to Neptune from S3. But in my use case i am having files in EFS. Is it possible to upload from efs to Neptune through…
I am looking to extend discussion held here about filtering vertices based on property value from collection.
However, in my case the collection is dynamic e.g. generated using store
e.g.
following works using a static list ['red', 'green'].
I am…
I was trying to reach the janusgraph deployed inside the GKE cluster, using the below code.
from gremlin_python import statics
from gremlin_python.structure.graph import Graph
from gremlin_python.process.graph_traversal import __
from…
I have deployed the Janusgraph using Helm in Google cloud Containers, following the below documentation:
https://cloud.google.com/architecture/running-janusgraph-with-bigtable,
I'm able to fire the gremline query using Google Cloud Shell.
Snapshot…
I have two gremlin queries. I want to filter out the output of one query based on the results of another query.
For example,
query 1: g.V().hasLabel('Person').values('name') gives the following output - John, Sam, Rocky
query 2:…
So, i'm trying to connect to arcade db using gremlin server, from a python script, what ever data i create ,such as new vertices and edges, how do i see them through the arcadedb studio?? Currently they are not visible (only the imported database is…
I am trying to batch insert edges using coalesce . And I was trying to follow this format for batch edge insert that I found on Neptune DB documentation:
g.V('v-1')
.outE('KNOWS')
.hasId('e-1')
.fold()
.coalesce(unfold(),
…
How can I get the list of nodes N-hops away from a given node (where N is a parameter)? Here, N-hops means we need to traverse (minimum) N edges (outward) from the source node to reach the destination node.
For 1-hop, the query can…
How do we find shortest path between two nodes using gremlin-python?
The example given for gremlin here shows the following gremlin query
g.V(1).repeat(out().simplePath()).until(hasId(5)).path().
group().by(count(local)).next()
How can I…
When the expected vertex or edge is not present in the database, gremlin python raises the exception StopIteration. How to resolve/prevent the exception. Query to return none or empty instead of an error.
Eg:
g.V().hasLabel('employee').has('name',…