245 questions
0
votes
1
answer
65
views
GremlinServerError 499: “The traversal source [g] for alias [g] is not configured on the server”
I’m trying to connect gremlin-python (v3.13.2) to a local Gremlin Server 3.7.3 on macOS 15.4.1 with Java 17, but every query fails with:
GremlinServerError: The traversal source [g] for alias [g] is ...
1
vote
1
answer
172
views
How to handle closed connections in gremlin-python Client's internal pool without full recreation?
I'm using gremlin-python (v3.7.3) in a multi-threaded Python application, sharing a single gremlin_python.driver.client.Client instance across threads. The client is configured with pool_size = 8 by ...
0
votes
1
answer
94
views
Error During JSON Data Upload to Cosmos Gremlin - Gremlin Query Execution Error: Cannot add a vertex where the partition key property has value 'null'
I am trying to upload a JSON file to Azure Cosmos DB - Gremlin API. I created a partition key (PK) as /LOCATIONSTATE in Cosmos DB which is one of the tags in JSON. Below is the python script I am ...
0
votes
1
answer
47
views
Gremlin query to find the shortest and longest path connection between two Labels
I am looking for the shortest and longest paths to connect two labels. I am experimenting with the following Gremlin Python code.
from gremlin_python.driver import client
from gremlin_python.process....
0
votes
1
answer
74
views
Why do I get 'Query requires iterating over all vertices' warning when checking for a connection
We are using JanusGraph (1.0.0) with a python fastAPI-based API, on kubernetes, to maintain and query our gremlin graph. Using gremlinpython, we periodically send this query for the sole purpose of ...
0
votes
0
answers
69
views
Neo4j Cypher conversion to Gremlin query
We are trying to convert the Neo4j cypher query into a Gremlin query, but we are stuck on some extract methods in the cypher query that need to be converted into the Gremlin query.
The cypher query ...
1
vote
2
answers
159
views
How to query janusgraph in python
I'd like to query janusgraphin python. I follow the instruction here, but didn't success. What might be wrong ? Thanks
Here's my code:
from gremlin_python import statics
from gremlin_python.structure....
1
vote
1
answer
28
views
How can I further aggregate the results of my graph traversal?
Using the example graph that can be created from the code below, how can I get counts of unique vehicles parked in different locations during a time interval? I need the solution to include ...
1
vote
0
answers
47
views
How can I create multiple properties for an edge in Janus Graph?
I am using Gremlin-Python and can create edges with a single property. However, when I try to create edges with multiple properties, I encounter the following error:
Received error message '{'...
0
votes
1
answer
132
views
Load an existing edge id in Neptune graph
I'm trying to run a python job in python that bulk loads the Neptune graph from csv files. The job loads these files through curl commands using request parameters (as shown below). However the load ...
0
votes
1
answer
60
views
Gremlin Complete Hierarchy From a Specific Node
I am having difficult time to fetch the completely hierarchy by a node id.
I want the all children and sub children which are directly and in-directly connected to a particular node.
Node Properties: (...
0
votes
0
answers
54
views
Facing Python Gremlin Timeout Issue: (gremlin-3.7.0)
I am using gremlinpython==3.7.0.
I am getting Timeout Issue, while fetching the results.
Error:
gremlin_python.driver.protocol.GremlinServerError: 598: {"detailedMessage":"A timeout ...
1
vote
1
answer
175
views
How to Set a Query-specific Timeout in gremlin_python for AWS Neptune?
I am using the gremlin_python library to execute a query on an AWS Neptune database and am experiencing timeouts despite setting a specific timeout threshold via the evaluationTimeout parameter. Here'...
1
vote
0
answers
111
views
gremlin python open janusgraph database using submit()
I was trying to switch to different database on runtime in gremlin_python. To do this, I used JanusGraphFactory.open() to open different configuration. Because gremlin_python does not have ...
0
votes
2
answers
74
views
Gremlin Query always returns: unhashable type: 'list'
Using gremlinpython==3.7.0 per this Azure Doc, No matter what query I submit, the response is always "unhashable type: 'list'"
Unless the query results are empty, then it works fine.
Example ...
1
vote
1
answer
777
views
SSL certificate error trying to access Neptune DB via nginx reverse proxy
I have two reverse proxies set up to access
OpenSearch
Neptune DB.
I use the public IP address of the EC2 instance in which ngnix is running and can sucessfully get results using their url's on the ...
0
votes
0
answers
166
views
Batch mergeV working well when creating items, but yielding unexpected results when updating
I used this thread Gremlin MergeV To Update an Existing Element's property and Single Cardinality as a reference to test a mergeV query that creates a vertex with some properties if its id is not ...
0
votes
1
answer
234
views
mergeV query not working on AWS Neptune with gremlinpython
So I'm trying to follow the instructions on this thread Send string gremlin query to Amazon Neptune database using TinkerPop's gremlinpython, but it's not working with the mergeV example extracted ...
4
votes
1
answer
122
views
Merge Operator in sack() step does not work as expected
I've been working with sack() step in gremlin. I'm trying to perform some operation on sack when two traversers merge. But for some reason the merge doesn't seem to work as expected. To describe my ...
1
vote
1
answer
276
views
gremlin_python.driver.protocol.GremlinServerError: 500: None
I'm trying to batch populate my JanusGraph database with vertices, and I'm noticing some very strange behavior. I've created a simple test script which reproduces this behavior:
import os
from dotenv ...
0
votes
1
answer
814
views
How to run query as a string using Gremlin Python
I'm using lambda to query a Neptune graph where I'm trying to get output paths for a set of nodes. The query string is dynamically created in code as shown below. I was initially using Eval() to do ...
0
votes
1
answer
58
views
select and arrange multiple result within single projection
Apologies for not having sample graph.
I’ve a directed acyclic graph mapping where Multiple nodes called "greatgrandparents" have edges to "grandparents" that has edges to ...
0
votes
0
answers
105
views
Gremlin python next() not working similar to next in Gremlin Console
In gremlin python I'm not able to find a way to iterate through without loading everything at once in the memory.
for eg.In gremlin python ->
g.V().next()
Will iterate all the vertices in the ...
2
votes
1
answer
112
views
Graph db with Gremlin property syntax error
I am trying to build a knowledge graph with Azure CosmosDB with Gremlin API.
While trying to create vertex, I came across an unexpected error. I am trying to add 'person' as a node. Below is my simple ...
0
votes
1
answer
46
views
couldnt able to create edge in gremlin
I tried to run the query below:
edge = g.V(id).addE("rated").to(g.V(n_id)).next()
but I am getting the error
InvalidRequest: Error from server: code=2200 [Invalid query] message="Could ...
0
votes
1
answer
42
views
Update edge properties from another existing edge in gremlinpython
I am trying to update edge in my dse graph by extracting properties of another existing edge as below:
edgeProperties = g.E(edge.id).valueMap().next()
g.V(newVertex.id).as_('newV').addE(edge.label).to(...
1
vote
0
answers
54
views
How to use a single query to retrieve a vertex whose id is given by the traversal?
I have a graph on Azure CosmosDB which involves company hierarchies where a Top Parent exists and there are child companies like
CompanyX(Top Parent) -> CompanyY(Child of X + Parent of A) -> CompanyA(...
2
votes
1
answer
254
views
gremlin query to n hops and traversal of all sub edges and nodes
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 -> ...
0
votes
1
answer
442
views
Python-Gremlin driver in Cosmos DB
I'm trying to use the gremlinpython library to connect to Cosmos DB, and it seems like only the async queries are possible.
from gremlin_python.driver import client, serializer
from gremlin_python....
0
votes
1
answer
47
views
Group vertices followed by Order and Retrieving them
I am very new to gremlin and currently am doing a proof of concept on Azure CosmosDB. My graph looks like this:
Add vertices of type object1:
g.addV(‘object1’).property('id','1').addV(‘object1’)....
0
votes
1
answer
128
views
Why is min(a,b) not working but max(a,b) working?
I’m writing a very simple Python code which requires the minimum of two integers, so when I do min(2,5) I get TypeError: 'Operator' object is not callable error. However, when I do max(2,5) I get the ...
0
votes
1
answer
34
views
gremlinpython writing a helper function to create vertexes if they don't exist, and create an edge between them if it doesn't exist
I'm working with gremlin and gremlinpython for the first time, and I'm hitting a wall when I try to create new vertexes and an edge between them. I've looked at some of the other resources online, but ...
1
vote
1
answer
119
views
What Gremlin query can I write to create custom relationships between all pairs nodes that have a certain number of connections in common?
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('...
0
votes
1
answer
229
views
Gremlin query in Python to Neptune works if query not assigned to variable, else "Object of type builtin_function_or_method is not JSON serializable"
I've connected to a Neptune DB in a Python3 Lambda function using these instructions here: https://docs.aws.amazon.com/neptune/latest/userguide/lambda-functions-examples.html.
Currently, if I query it ...
1
vote
0
answers
280
views
gremlinpython submit async query returns ClientConnectorCertificateError in Django
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:
...
-2
votes
1
answer
70
views
addEdge with python gremling GLV - how to get syntax correct
The error:
TypeError: The child traversal of [['addV']] was not spawned anonymously - use the __ class rather than a TraversalSource to construct the child traversal
appears when trying to run the ...
1
vote
0
answers
64
views
How to multiply some values of a groupCount() in gremlin queries if a acertain condition is met
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 ...
1
vote
1
answer
170
views
Is it possible to upload files from efs instance to amazon Neptune through python
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 ...
2
votes
1
answer
944
views
Turn gremlin query result with elementMap into JSON [gremlinpython 3.6.1]
Continuing discussion from here.
I've a query that provides list of paths along-with elementMap().
How do I convert this data to JSON to be consumed by rest of the code.
I did look here that talks ...
0
votes
1
answer
79
views
direct edge traversal omitting paths
I am running into curious problem.
In graph above,I can't run repeat/until due to memory overload issue and vertices names changing at various level. I am trying direct edge traversal through each ...
1
vote
1
answer
130
views
search for value by key within dynamic collection
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 ...
0
votes
1
answer
31
views
How to find all vertices having multi properties
Let's imagine I have the following two verices:
g.addV('set-test').\
property('mySet','one').\
property(set_, 'mySet','two').\
property(id_,'set-test1').next()
g.addV('set-test2').\
...
0
votes
1
answer
207
views
Using Project + valueMap in combination with where
I have the following graph: https://gremlify.com/vxkibjtoz3b
if u can't open the link the graph is lloking the following:
You can see there 2 queries. The first one:
g.V().out("r").as("...
0
votes
1
answer
362
views
How to get an AWS Neptune gremlin query to filter by pricing_id
I have a working query using gremlin_python that looks like the following (simplified to focus on the issue)
client.graph.V().as_('origin') \
.outE().as_('p1r1') \
.inV().as_('midpoint'...
0
votes
2
answers
631
views
Gremlin Python(AWS Neptune) get vertices with relations to list of other vertices
New to Gremlin_python and GraphDBs in general, we are using AWS neptune. I am trying to get a list of scenarios that have relations to a set of different tags e.g. give me all scenarios that has tag A ...
1
vote
1
answer
398
views
Why "_ipython_canary_method_should_not_exist_" occurs in Jupyter?
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....
0
votes
1
answer
494
views
Gremlin union query takes long time to execute against Neptune DB
The following Gremlin query takes long time when you run using union clause. This is a common search query which is being used from many pages.
It works fine if you use it on entities with fewer nodes....
2
votes
0
answers
65
views
How to connect gremlin with python runtime in GCP environment?
Janusgraph is deployed and running in GCP container, I can access that using Cloud shell.
I want to perform some CRUD operation using python runtime.
What are the connection URL, and ports I have to ...
1
vote
1
answer
116
views
How to connect Janusgraph deployed in GCP with Python runtime?
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 ...
1
vote
1
answer
81
views
Gremlin filter one query's output based on another query
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 ...