Questions tagged [gremlinpython]

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.

Links

223 questions
0
votes
1 answer

Verifying iterative edge insertion in Gremlinpython

Trying to iteratively add vertices and edges. It seems to work, there are no errors, but I wish to verify that the edges are also correctly added. The loops below insert at least the nodes, as the printing of the list length at the end shows, but…
nick88
  • 118
  • 1
  • 8
0
votes
1 answer

Gremlin Client Connecting to Gremlin / JanusGraph Server via URL-based Load Balancers

Due to security policies, I have a cluster of JanusGraph servers (running in an internal Kubernetes network) that can be accessed by external Gremlin clients via the below network route: clients --> global load balancer (URL-based) --> third-party…
0
votes
1 answer

gremlinpython - get IDs from edges as simple list instead of dictionary

When using gremlinpython, is it possible to only return a list of IDs for edges, instead of returning this long winded dictionary? So, currently g.E().limit(10).id().toList() returns this: [{'@type': 'janusgraph:RelationIdentifier', '@value':…
Ian
  • 3,605
  • 4
  • 31
  • 66
0
votes
1 answer

How to map a python class to a gremlin vertex?

I had hoped tha mapping a class to a vertex in gremlin python would be as simple as: def toVertex(self,g): t=g.addV(type(self)) for name,value in vars(self).items(): if debug: print("%s=%s" % (name,value)) …
Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
0
votes
1 answer

gremlin io step from url

https://www.compose.com/articles/importing-graphs-into-janusgraph/ shows how you can import data into janus graph. Since i couldn't get janusgraph docker working on my Mac computer using localhost i tried a connection to a remote Ubuntu machine…
Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
0
votes
2 answers

Gremlin identifying subsets of populations based on vertices that only have in or out edges

I've got a gremlin graph with users who have features. The edges of the graph go out from the users and enter the features. There are no incoming edges to the users and there are no outgoing edges from the features. Each user vertex has many dozen…
Justin Gerard
  • 147
  • 1
  • 7
0
votes
2 answers

Gremlin Python: How to use coalesce to get vertex if exists, else insert

Is it possible to use the Gremlin coalesce step to select a vertex by id (or properties) if such a vertex exists, otherwise insert the vertex? I've attempted to do so with the following, but I get a 'list' object has no attribute 'coalesce' error,…
JTW
  • 3,546
  • 8
  • 35
  • 49
0
votes
2 answers

Gremlin - search for multiple substrings

For a given vertex, I can find whether a property myproperty contains a single substring substring1, as so: g.V(993280096) .filter({it.get().value("myproperty").contains("substring1")}) How can I extend this to search for multiple substrings in…
Ian
  • 3,605
  • 4
  • 31
  • 66
0
votes
3 answers

Why do the API calls not work in Gremlin Python?

In gremlin-python I can do: for e in g.E().toList(): print(e) and will get a result like e[11][4-created->3] e[12][6-created->3] e[7][1-knows->2] e[8][1-knows->4] e[9][1-created->3] e[10][4-created->5] According…
Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
-1
votes
1 answer

How to delete all existing edge and re-insert them from a CSV file

Currently I am using Neptune's bulk loader to load data from CSV to Neptune database using Python. I was getting only modified records. So I was only inserting the data. Now the file contains full/historical records and the requirement is to delete…
user2026504
  • 69
  • 1
  • 9
-1
votes
3 answers

How can I set array as property in janusgraph?

I want to set the property for vertex and edge as a list value. I'm using janusgraph. Gremlin-python
-2
votes
1 answer

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 following code with python GLV a = g.addV() b =…
Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
1 2 3
14
15