I have such gremlin query which perfectly works in gremlin console: However same query fails in gremlin for java org.apache.tinkerpop:gremlin-core with such error: Incompatible equality constraint: Map<String, Object> and Map<Object, Object>. That is understandable because: valueMap returns GraphTraversal<Element, Map<Object, Object>> project returns GraphTraversal<Object, Map<String, Object>> union expects traversals to operate over same type Is there any built-in solution for this?
Tag: gremlin
Convert GraphTraversal<Vertex, Map> into Java8 stream
I have a result of a query to graphDB which returns GraphTraversal<Vertex, Map<Object, List>> values. By using the default methods values.iterate().toStream() it should return a Stream of Stream<Map<Object, List>> which I can handle as a Java8 stream, but for some reason, it does not work, repeat, by using the default methods from gemlin API to get the stream. Note: By
Gremlin Driver blocks while initializing ConnectionPool with multiple endpoints
We are running a neptune DB in AWS. We have one writer and 3 reader instances. A few weeks ago, we found out, that the load balancing does not work as expected. We figured out, that our software instance is connecting to just one reader and keeps this connection until EOL. So the other reader instances were never be taken.
Why does my Gremlin traversal add only one edge?
As described in another question, I am attempting to add several “identity” vertices into a “group” vertex. Based on the recipe recommendation, I’m trying to write the traversal steps in such a way that the traversers iterate the identity vertices instead of appending extra steps in a loop. Here’s what I have: This always returns a value of 1, no
How do I retrieve multiple multi-properties in Gremlin?
I have a Person object that I’m writing to a graph like this: Now I want to retrieve contents of the vertex. As documented, elementMap doesn’t work because it returns just a single property value for multi-properties. I tried values(‘name’, ’email’), but that returned all of the properties in a flattened list instead of the nested structure I expected: I’ve