Questions tagged [tinkerpop]
Apache TinkerPop™ is a graph computing framework for both graph databases (OLTP) and graph analytic systems (OLAP).
tinkerpop
1,007
questions
0
votes
1
answer
23
views
Why is addE failing with a string reference to an earlier step?
I'm trying to create a Vertex and an Edge if the vertex doesn't already exist. This is the Gremlin query I'm trying to run:
g.V(4128).as('parent').out().has('qt', 1).fold().coalesce(unfold(), addV('...
0
votes
1
answer
21
views
Tinkerpop vertex property single cardinality is not working
When creating a vertex i explicitly mentioned Cardinality as single still its taking list, not able figure out why.
wg.addV("label")
.property(VertexProperty.Cardinality.single,"name&...
0
votes
0
answers
22
views
JanusGraph edges from Java do not appear in Gremlin console
I'm running a JanusGraph server and client per the instructions here. I included an argument to expose port 8182 so I can connect to it from a Java application.
My Java application just creates a new ...
0
votes
1
answer
24
views
How to get all incoming direct and indirect nodes with edges of a given node
I have a graph like below
a->b
b->c
d->c
a->c
e->d
c->e
e->a
f->g
g->a
c->h
If i select c, it should return all incoming direct and indirect nodes with edges along the ...
0
votes
1
answer
19
views
Apache TinkerPop Gremlin query language is not getting converted to Neptune-specific steps that are optimized to run on the underlying Neptune engine
I am using explain() API on AWS neptune cluster as below-
GraphTraversalSource g = getTraversal(cluster);
TraversalExplanation explain = g.V().hasLabel("Users").explain();
System.out....
0
votes
1
answer
16
views
How is select being used outside a traversal? groovy gremlin vs nodejs gremlin
I found this QA to be very useful, or at least would be if I understood what the heck is going on, and could translate it from groovy gremlin to nodejs gremlin. What's tripping me up is the use of the ...
0
votes
1
answer
70
views
Neptune graph traversal that uses dynamically calculated values from last vertex to select outgoing edges for further traversal
Here is my graph:
Here is graph building code:
// backslashes included so the code can be copy and pasted into gremlin console
g\
.addV("Person").property(T.id, "A").as("a&...
0
votes
1
answer
29
views
Neptune Gremlin how to break cycles when collecting paths
I have the following graph:
Created using:
g.addV("Person").property(T.id, "1").as("p1")
.addV("Person").property(T.id, "2").as("p2"...
1
vote
1
answer
27
views
why doesn't this graph traversal object have a .from() function? gremlin query in nodejs
I've encountered a bug, and here is the minimal replication of it in nodejs.
g.addV("foo").as("x").addV("bar").as("y").addE("relatesTo").from("x&...
0
votes
1
answer
60
views
efficient graph traversal to find connected components
I'm new to graphDB, I have a graph as shown in the attached image.
I want to find a connected path like "A1,E1,A2,D2,A3" for this I wrote the following query
g.V().hasLabel('A1').repeat(inE(...
1
vote
1
answer
24
views
Java Optional - equivalent in Gremlin
I would like to make a query that works on an element. But sometimes this element doe not already exist. So the query shoudl create it on demand. Like in Java the Optional::orElseGet - method.
My ...
0
votes
1
answer
29
views
The most efficient way to compare 2 aggregates (set of vertices) in Gremlin Query Language
What's the most efficient way to compare 2 aggregates (set of vertices) and see if they contain the exact same results?
Using this doesn't seem to work:
.where(select('aggregate1').is(eq('aggregate2'))...
1
vote
1
answer
48
views
Migrating a node label in gremlin tinkerpop
I'm working on migrating a graph from an old naming system to a new one and am looking for an efficient way to effectively re-label a given node label without losing node or edge properties or any ...
1
vote
1
answer
32
views
Neptune query behavior during edge creation
Gremlin query submitted to neptune to create edge , behaves differently when source/target vertices are missing.
we are using gremlin query in below format to submit edge creation on amazon neptune.
...
1
vote
3
answers
123
views
Running a local tinkerpop gremlin graph for testing in nodejs
I'm looking for a solution to run a gremlin tinkerpop graph locally to use for toy graphs for unit testing with Jest. I saw tinkergraph, but it doesn't appear to have a javascript implementation that ...
1
vote
0
answers
36
views
gremlin query to count by path-length all paths between nodes that share the same (specified) label
I have a graph with no cycles. Each vertex has a label. For those with a specific label, call it "A", I want to count
how many nodes with label "A" are not connected to any other ...
1
vote
0
answers
34
views
Gremlin.net throwing exception when using tree
When using the following query in Gremlin.net, I get the exception: System.Collections.Generic.KeyNotFoundException: 'The given key 'DataType{ TypeCode = 43 }' was not present in the dictionary.'
var ...
1
vote
1
answer
78
views
I am creating client application in java using tinkerpop for gremlin but i am unable to query through my application. JanusGraph and Gremlin server
I am trying to build client application in java for gremlin. My janusgraph server is running on one more virtual machine in the same network. Through my gremlin client code i am able to establish ...
0
votes
0
answers
57
views
Gephi not displaying graph from gremlin console .......1. error
Ibeen tinkering with Gremlin console and was trying to visualize graph created in gremlin console through Gephi(V0.1)and gremlin 3.7.
I followed the instruction from Tinkerpop tutorials.
https://...
0
votes
1
answer
35
views
Why I could not do E step at the middle of a Gremlin query?
I notice that I could not have an E step at the middle of a Gremlin query. Is there a reason behind it, or just the feature is missing?
g.V().....E()...
Basically, I have an index on an edge property ...
0
votes
1
answer
45
views
Fetch substring of a field from the edge of a graph
I am trying fetch substring of field that is stored as an attribute in the edge of graph. To be more specific on the company-company edges
I have attached the graph creation query.
g.addV('company')....
0
votes
1
answer
69
views
Tinkerpop Gremlin Query: Find all edges pointing back to a vertex in the current path
I query the following path:
Company has Employees has User
From User I want to find all HasRights edges which point back to the current Company (the user also has rights on other companies).
See TODO ...
0
votes
1
answer
89
views
gremlin query for cycle detection works for complex graph but returns nothing for simple one
I have a gremlin query to detect cycle nature of the graph. I have tested it with multiple large complex graph it works as expected. But it does not return anything with simple 1 depth graph.
Could ...
0
votes
1
answer
51
views
select and arrange multiple result within single projection
Apologies for not having sample graph.
I’ve a directed acyclic graph mapping where Multiple nodes called "greatgrandparents" have edges to "grandparents" that has edges to ...
0
votes
0
answers
50
views
Gremlin query to check the cycle nature of the graph
I am new to gremlin. I have task where I need to check the cycle nature of the vertex in the graph and return the output in either of the format String or Boolean:
{'crn': 'COMPANY_X', 'cycle': 'Y'}
{'...
0
votes
1
answer
69
views
Modify the gremlin Query to add a new field along with existing one
I am new to Gremlin struggling modify the query to get the appropriate result.
I have a query that gives the depth of the graph. The query is as below:
g.withSack(0)
.V('company_1')
.repeat(
...
1
vote
1
answer
77
views
Efficient way for filtering related nodes connected to a supernode
I am trying to filter connected nodes to a super node in Janus Graph where millions of vertices can be connected to a super node directly at level =1, suppose there is a parent node, it could have ...
0
votes
1
answer
60
views
Gremlin Query to fetch all objects till specified level along with sibling nodes
I have a Gremlin hierarchy of nodes which are referenced (Refer below pic). How can I retrieve all nodes, including their sibling nodes, at a specific provided level from root node ?
For instance,
...
0
votes
1
answer
39
views
Gremlin query traverse multiple nodes and edges
Knowledge sharing --> Below query traverse from A(node)<--W(edge)<--B(node)-->X(edge) --> C(node)-->Y(edge)--> D(node)<--Z(edge)<--E(node)
g.V().hasLabel("A")....
0
votes
0
answers
80
views
Tinkerpop Gremlin upgrade path (3.4.10 - 3.6.5)
I have to upgrade AWS Neptune Engine version to 1.2.1.0. The current Tinkerpop gremlin version (as a client) is 3.4.10.
Now, Thought I have already upgraded the Neptune server version which is still ...