Questions tagged [gremlin]

Gremlin is the graph traversal language and virtual machine of Apache TinkerPop™

Gremlin is a graph traversal language and virtual machine, developed by Apache TinkerPop. Gremlin is designed to work with any TinkerPop-enabled graph system, such as Titan, OrientDB, Neo4j, RDF stores like Stardog and Blazegraph, and others.

For more information, see the most recent reference documentation for TinkerPop.

3522 questions
5
votes
1 answer

In Gremlin, how can one query vertices where one property value is greater than another property value?

I'm sure this is straightforward, but I'm not sure how to do it. I have vertices, with a certain label, which have two integer properties. Let's call them integer1 and integer2. I simply want to query for all vertices where integer2 is greater than…
Amit A.
  • 71
  • 1
  • 3
5
votes
3 answers

Convert string command of Gremlin to executable

I have created a long Gremlin chained command as a string. What is the best way to execute it in NodeJS or Python? g.addV("person"). property(id, 1). property("name", "marko"). property("age", 29).as("1"). addV("person"). property(id, 2). …
5
votes
1 answer

Gremlin, javascript: where is the function "valueMap()" imported from?

I am using es6 on nodejs, and am trying to execute the project() step in a gremlin query. As part of the projection, I want to extract the properties. Using gremlin console I would use valueMap() to get the properties. However, when I attempt this…
Joel Stevick
  • 1,638
  • 2
  • 16
  • 22
5
votes
1 answer

Gremlin: The traversal source [g] for alias [g] is not configured on the server

I'm using a Docker instance for my janusGraph database and being very specific; I use the following Docker image: https://github.com/sunsided/janusgraph-docker The image works OK, except as soon as I get rid of row number 12 in this groovy file:…
Erik van de Ven
  • 4,747
  • 6
  • 38
  • 80
5
votes
1 answer

Traditional pdf indexing solution compared to graph-based version

My intention is to index an arbitrary directory containing pdf files (among other file types) with keywords stored in a list. I have a traditional solution and I heard that graph based solutions using e.g. SimpleGraph could be more elegant/efficient…
pdvsofismo
  • 61
  • 4
5
votes
1 answer

How to collect all vertex and edge properties along path, with Gremlin

Here's a really simple query: g.V('customerId').out().path() The JSON output of this is { "requestId":"96b26c1d-d032-2004-d36e-c700bd6db2a2", "status":{ "message":"", "code":200, "attributes":{ …
Wendell Blatt
  • 177
  • 1
  • 1
  • 10
5
votes
1 answer

Gremlin-server create a graph by loading data from csv files from gremlin-python

I found a guide for creating a graph using csv data files using groovy. (https://github.com/vsantosu/gremlin-importer/wiki/CSV-import-guide) Say I want to create this marvel superheroes graph (or any graph for the matter) on gremlin-server using…
Tushar Aggarwal
  • 827
  • 1
  • 10
  • 26
5
votes
2 answers

GroupCount order by

The Unit test code from the simplegraph-core testsuite below displays the region count of airports but it is not ordered as I would have expected. The result starts with: NZ-BOP= 3 MZ-A= 1 MZ-B= 1 IN-TN= 5 MZ-N= 1 PW-004= 1 MZ-I= 2 BS-FP= …
Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
5
votes
1 answer

Gremlin.NET: Execute queries using .Next() raises NullReferenceException

Starting from the Azure Cosmos DB Graph API example: https://github.com/Azure-Samples/azure-cosmos-db-graph-gremlindotnet-getting-started I am interested in using Gremlin.NET (the example uses version 3.2.7) to execute queries using the C# classes…
Chris
  • 495
  • 5
  • 18
5
votes
1 answer

How to use a UUID as id in Gremlin?

I'm adding verticles like this: g.addV("foobar").property("id", 1).property(...etc... How can I set a property with a uuid instead of an integer id?
Bob van Luijt
  • 7,153
  • 12
  • 58
  • 101
5
votes
2 answers

Wildcard or "LIKE" search in azure cosmos db with Gremlin Graph API

I'm trying to search for vertices in a kind of wildcard search. In SQL it would be: "where name like '%abc%'". Neither Gremlin graph traversal nor SQL-queries support it. The use case is to filter a 1:n dependency, e.g. "Show me all my customers…
user3151341
5
votes
1 answer

Use of store and select keywords in gremlin

Im new to gremlin. i followed the document on tinkerpop3. But i couldn't understand the use of store and select keywords.. Can anyone explain it simply?
vineeth
  • 198
  • 3
  • 13
5
votes
2 answers

What is the use of double underscore in repeat() or other steps in Tinkerpop Gremlin?

I have noticed double underscore being used in some step functions in Tinkerpop Gremlin 3.3. Could someone please tell why we use this double underscore with an example ? I could not find enough information about this in the documentation.
livetolearn
  • 221
  • 3
  • 11
5
votes
2 answers

CosmosDB creation - API option (SQL vs Graph)

I'm interested in using the Azure CosmosDB for it's Graph capability. Looking through the docs i saw that it sores graph vertices and edges as JSON documents (with an agreed schema) and so it can be accessed as a plain old DocumentDB. Taking this…
RazvanG
  • 83
  • 4
5
votes
1 answer

Gremlin - How do find vertices with 'null' property?

Let's say I have vertices with label reviewer and property name. I can query for 'John Smith' with: g.V().hasLabel('reviewer').has('name', eq('John Smith')) But I cannot query for null 'name' with: g.V().hasLabel('reviewer').has('name',…
Glide
  • 20,235
  • 26
  • 86
  • 135