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
2
votes
1 answer

How to write a gremlin query that finds common vertices between other vertices and return sorted by the count of overlap?

I am using python+gremlin to implement my graph queries, but still far from understanding a lot of the concepts, and have encountered an interesting query I don't know to do. Let's say we have a number of chef vertices with label Chef, ingredient…
2
votes
2 answers

View Neptune Graph Schema using Jupyter notebook

Is there a way to view the schema of a graph in a Neptune cluster using Jupyter Notebook? Like you would do a "select * from tablename limit 10" in an RDS using SQL, similarly is there a way to get a sense of the graph data through Jupyter…
2
votes
1 answer

How do I find vertices without particular edges from a particular vertex in Gremlin?

I am using python to run my gremlin queries, for which I am still getting used to / learning. Let's say I have vertex labels A and B, and there can be an edge from A to B called abEdge. I can find B vertices that have such edges from a particular A…
alexexchanges
  • 3,252
  • 4
  • 17
  • 38
2
votes
1 answer

Ego Network using Gremlin

I'm new to gremlin and have been working on creating an ego network using Gremlin. Ego-alter connections are pretty easy to find, but the problem lies in finding alter-alter connections. Is there a way to write a query which extracts all the…
Shubham Yadav
  • 561
  • 7
  • 16
2
votes
1 answer

How can one use the 'as' keyword in gremlin python?

When attempting to translate a query I wrote and tested in the Gremlin CLI to gremlin-python, I'm encountering unexpected token 'as' errors on my .as('foo') expressions. How can one use the Gremlin as keyword when using gremlin-python?
JTW
  • 3,546
  • 8
  • 35
  • 49
2
votes
1 answer

Gremlin bulk load csv date formate

I am trying to upload data in to the AWS neptune, but getting error because of date format sample format of csv: ~id, ~from, ~to, ~label, date:Date e1, v1, v2, created, 2019-11-04 can some one help me on this?
Ragul M B
  • 204
  • 3
  • 9
2
votes
1 answer

Gremlin - filtering Edges from a zipped list of property values

I have two properties on my Edges that I want to filter on: a and b. I want to filter these properties using the following list: lst = [['0102', '2017-01-01'], ['4920', '2018-07-01'], ..., ['2198', '2018-04-01']] ... and using the following…
Ian
  • 3,605
  • 4
  • 31
  • 66
2
votes
1 answer

Gremlin Python - How to get ID from valueMap

I am fetching all the values from my graph into a list called nodes: nodes = g.V().valueMap(True).toList() For each node, I would like to get the id but I don't know how. E.g. I have a field called 'name'. To get name of the first vertex I would do…
Saleem
  • 92
  • 2
  • 12
2
votes
2 answers

gremlin-python is not an available GremlinScriptEngine

I am trying to execute lambda function on AWS neptune using gremlin python. Its hitting me gremlin-python is not an available GremlinScriptEngine. Can someone help on how to fix this. g.V().out().map(lambda: "lambda x:…
2
votes
1 answer

Edges creation is not working in gremlin python

Trying to create edges between vertices using gremlin-python, but it is not working jupyter notebook "g.V('ProdDev').addE('belongs').to(g.V('Dept'))" edges should create....currently empty edges are creating...
2
votes
1 answer

Using gremlin-python Janus for social networking application

I'm getting started with graph databases. I want to migrate a social networking application from sql to Janus Graph database. I plan to build the application using Python Django framework. I also plan to scale the application using using IBM's…
2
votes
1 answer

Edges among a list of vertices - gremlin python

I have a list of vertex ids. I want to get all possible edges among them. I understand methods like filter/where would be of help here, but since I'm using gremlin-python, their implementation must be different. I have tried : a =…
Tushar Aggarwal
  • 827
  • 1
  • 10
  • 26
2
votes
1 answer

Gremlin Python project By clause

Have a graph running on Datastax Enterprise Graph (5.1 Version), running on Cassandra storage. Trying to run a query to get both the ID and the property. In Gremlin Console I can do this: gremlin> g.V(1).project("v",…
2
votes
1 answer

specifying custom partition and clustering keys when creating vertices with gremlin-python

I have created the following schema using a custom partition and clustering key: schema.propertyKey('_partition').Text().create() schema.propertyKey('topic_id').Uuid().create() schema.vertexLabel('custom_topic') …
1
vote
0 answers

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(Child of Y + Parent of B,C,D) …