Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
1 vote
1 answer
76 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('...
jjjjohnson's user avatar
0 votes
1 answer
115 views

How do I pull specific property values from an injected object when adding a batch of edges in a Gremlin/TinkerPop traversal?

I want to add batches of edges to a JanusGraph db that already contains nodes. I want my edges to support setting dynamic/optional properties. I've cobbled together the following traversal (based on ...
dotybear's user avatar
  • 147
0 votes
1 answer
276 views

Cannot add vertices or edges to CosmosDB Gremlin graph with Python SDK

I have a Cosmos DB instance running the Gremlin API, and I am using the Python SDK on 3.7. Currently I am trying to build a graph that models papers with topics and authors, by having each object ...
AgentNo's user avatar
  • 251
0 votes
1 answer
85 views

How to get the latest property of vertex from apache gremlin?

How to get the latest property of vertex from apache gremlin? With the same key, We can add multiple properties. vp[status->new] vp[pre_signed_url->https://e-voting.s3.] vp[pre_signed_url->...
Thirumal's user avatar
  • 9,116
1 vote
1 answer
506 views

How do you add edges to existing vertices in Gremlin-python?

What is the standard way to add edges between two already existing vertices in gremlin-python? I've tried numerous iterations including the two code versions below, but unfortunately they all lead to ...
Sagar's user avatar
  • 11
0 votes
1 answer
1k views

Use gremlin module for Python to add vertex to Amazon Neptune graph database

Synopsis I am trying to use Python on an Amazon EC2 instance, in the same VPC as an Amazon Neptune instance, to add a vertex (node) to Neptune. Using the example code for Amazon Neptune, I constructed ...
user avatar
0 votes
1 answer
432 views

Gremlin python - how to ignore property of type List when adding properties to vertex

I want to add persons as vertices in a graph which works with the following code: from gremlin_python.process.graph_traversal import __ from gremlin_python.process.traversal import Column persons = [{...
Ash_inc's user avatar
  • 15
3 votes
1 answer
4k views

How do I get all the edges, associated vertices, and the respective id, label and properties via gremlin-python?

I want to fetch all the edges and associated vertices from my AWS Neptune DB. In addition, I want the id, labels and properties for the nodes as well as edges. My data is a stored as a property graph ...
Analytical Monk's user avatar
1 vote
1 answer
929 views

Unable to list all vertices present in Janusgraph with ".toList()" using Gremlinpython

I have tried testing what is in a graph that I created to see whether nodes were indeed created. The code to create a small graph for testing: from gremlin_python import statics from gremlin_python....
robin214's user avatar
2 votes
0 answers
409 views

How to build gremlin query to add and drop vertex as part one transaction

I want to build a gremlin_python query dynamically that adds vertices and deletes vertices in single transaction. For Ex: Lets say my graph has a vertex with property desc ='toBeDeleted'. I want to ...
Deepa Shettar's user avatar
9 votes
1 answer
4k views

gremlin python - add multiple but an unknown number of properties to a vertex

I want to add more than one property to a vertex, but from the outset do not explicitly know what those properties might be. For example, say for one person to be added as vertex to the graph, we have ...
Ian's user avatar
  • 3,830
1 vote
1 answer
786 views

Using a combination between coalesce and values fails in gremlin-python

I am trying to project a property that may not exist in the node. According to the docs, this could be achieved by using coalesce with values. Executing the query g.V(1).project('unexisting').by(...
dimmg's user avatar
  • 3,765
1 vote
1 answer
696 views

Adding multiple vertices, changing one property-value (tinkerpop3 + python GLV)

I'm trying to size down my code, but I need several instances of data of this type: g.addV('A').property('a-type','thing-x').property('a-value',1).next() g.addV('A').property('a-type','thing-x')....
Jeff Jones's user avatar
2 votes
1 answer
2k views

gremlin in python NameError not recognising functions

I am running Gremlin-Pyton in a Jupyter notebook and for some reason the following does not work: g.V().group().by().by(bothE().count()) I keep getting the error: NameError: name 'bothE' is not ...
Maths12's user avatar
  • 963
1 vote
1 answer
3k views

How do i upload tinkergraph into python/gremlin?

I am trying to use gremlin in python. I imported the following: from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection from gremlin_python.structure.graph import Graph ...
Maths12's user avatar
  • 963

15 30 50 per page