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

I have try to connect python jupyter notebook with amazon neptune DB Instance, but I got an error like this, what should I do?

This code, I got from the Amazon Neptune Tutorial https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-python.html But, I got an error like this when I try to run the code in Jupyter Notebook (internal in my laptop). This is my…
0
votes
1 answer

Deep graph traversals with labelled output

I'm trying to write a function to generate a Gremlin query. The input of the function is an array of array of strings, with the names of relationships we want to return from the graph. The graph contains information on TV and movies. So an example…
TKems
  • 15
  • 4
0
votes
1 answer

Gremlin: getting json response in Java with gremlin-driver

I have the following query: g .V("user-11") .repeat(bothE().subgraph("subGraph").outV()) .times(2) .cap("subGraph") .next() When I run it using gremlin-python, I receive the following response: {'@type': 'tinker:graph', …
Franco Cuevas
  • 91
  • 1
  • 5
0
votes
1 answer

Gremlin calculate date difference from today

Date was stored in gremlin. I want to get months between stored date and today. Is it possible to write only using gremlin?
0
votes
1 answer

AWS neptune throwing timeout error when th e query timeout value is higher

I am running a gremlin query on the AWS neptune which use to take 2.5 minutes for the results, I have kept my neptune_query_timeout = 500000 , the neptune engine version is 1.0.4.1 Recently I am seeing this error on my same query which just use to…
0
votes
1 answer

gremlin traversal on AWS neptune

I have a graph structure like this- Node1(Console) <----Uses--- Node2(Name, Age) -----plays----> Node3(Game) So, i have three nodes - Node1 is console like a PS3/ Nintendo. Node2 is a person with properties name and Age. Node3 is game node…
0
votes
1 answer

Getting the vertex and the details of the vertex connected to it

I have a scenario like below, need to get the 'Application' label vertex properties and also, the id or property of the 'work' vertex that is connected to it I have written the gremlin glv query to get the path and the Application properties, but…
user1293071
  • 253
  • 1
  • 3
  • 14
0
votes
2 answers

Gremlin optional as empty

Could you please help me to understand whether there is any option where we can skip the optional in the gremlin, the scenario is, we are traversing through a graph and has an optional statement depending on a query parameter in the request, I will…
user1293071
  • 253
  • 1
  • 3
  • 14
0
votes
1 answer

Gremlin-python: How to use user-defined-steps to reuse traversal logic

I am trying to simplify the following traversal: operation_dict['output_schema'] = g.V(operation_id).outE('uses').inV()\ .project('id','label','attribute_id', 'attribute_name',…
anderwald
  • 139
  • 3
  • 9
0
votes
1 answer

How to do inner join on vertices in Gremlin query?

my schema is as follows: A "buy" from B, C, D, E; A "know" F; F "buy" from B, G, H. how to get B(the common seller shared by anyone the buyer knows) only from A(a buyer) in Gremlin?
0
votes
1 answer

Running into uvloop issues with Database queries from Rasa-X?

I'm trying to make a simple query to my amazon neptune database, from Rasa-x. Here is the code from my actions.py: class ActionQueryDietary(Action): def name(self) -> Text: return "action_query_dietary" def run(self, dispatcher:…
0
votes
0 answers

Gremlin-python: how to write a query which uses the properties of both joined vertices in the where condition?

I am new to Gremlin and am trying to convert a SQL query to Gremlin. I have two vertex types, labeled host and repo, and here is the Gremlin script to create the vertices and the edges: g.addV('asset').property(id, 'a1').property('ip',…
Malgi
  • 680
  • 1
  • 7
  • 20
0
votes
1 answer

How do I multiply a vertex property with an edge weight from an edge pointing to it?

I am stuck on a graph traversal problem I seem to be having. I use gremlinpython and my DB is stored in AWS Neptune. The graph looks similar to this example: g = TinkerGraph.open().traversal() o1 = g.addV('o').property('order','order1').next() r1 =…
Morinaga
  • 35
  • 1
  • 8
0
votes
1 answer

Gremlin - finding connected nodes with several boolean conditions on both nodes and edges properties

I want to find nodes who should be linked to a given node, where the link is defined by some logic, which uses the nodes' and existing edges' attribute with the following logic: A) (The pair has the same zip (node attribute) and name_similarity…
DvirNa
  • 3
  • 2
0
votes
1 answer

gremlin python subgraph always empty

I use gremlin python to connect the gremlin server like this: g = traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin', 'g')) But when I work with subgraph(referenced here…
Espada
  • 47
  • 6
1 2 3
14
15