Apache TinkerPop

AT

Apache TinkerPop

Apache TinkerPop is an open source graph computing framework and the home of the Gremlin graph query language.

Join

cypher-gremlin-console-plugin with Tinkerpop 3.7.2

Have anyone managed to get the cypher-gremlin-console-plugin v1.0.4 or another version working with Tinkerpop 3.7.2 ? The latest published version of the plugin seem to only work for Tinkerpop 3.4 which is pretty old. The problem seems to be that in v3.7.2 some required classes were moved or refactored into different packages. Hence, the plugin throws ClassNotFound exceptions....

Gremlin python MergeV update properties

I'm working with gremlin python 3.7.1 and AWS Neptune 1.3.2.1, and I'm trying to update vertex properties with MergeV().option(OnMatch, {...}), however the behavior isn't what I expect, it should be a=b but appears to be a=[c.b] where c is the old value. Someone knows how to implement correctly this behavior with MergeV?
Solution:
If I'm understanding your question correctly, I think what you are seeing is a result of Neptune defaulting to set cardinality for properties. Essentially what that means, is if I start with a vertex with property("name", "Alice"), and I try to overwrite the property with property("name", "Bob") Neptune will instead add the new property to a set such that vertex.name = {"Alice", "Bob"}. I think this is what you are seeing this set cardinality behaviour when using MergeV(). If you want to use mergeV and enforce single cardinality for properties (overwrite existing values instead of appending), you can try a query like this: ```...

How can I use a subquery to translate airport code DAL into icao airport code KDAL, w air-routes?

I've loaded the air-routes data set, and I've added an aircraft like so: g.addV("aircraft").property("aircraftLocation", "DAL") I want to write a query that reports the location of all my aircrafts like so: [tailNumber:N12345,aircraftLocationIcao:KDAL] To accomplish this, I need to translate the IATA aircraft location "DAL" into the ICAO aircraft location "KDAL". So the .project() step is not straightforward....

Gremlin.net for .net 8

Hi all, when can we expect a Gremlin.net version targeting .net 8? Gremlin.net’s latest version v3.7.3 only supports .net 6 which is out of support.
Solution:
Hi @lijinv, could you expand on any issues you may be seeing when attempting to use Gremlin.net with .net 8? .net 8 should be fully supported as of v3.7.2, and we currently run all of our Gremlin.net testing in .net 8. https://issues.apache.org/jira/browse/TINKERPOP-3030. If you have found any incompatibilities with v3.7.3 in .net 8, that should likely be considered a bug....

Trying to load air-routes.graphml yields no such file or directory

graph.io(graphml()).readGraph('~/Downloads/air-routes.graphml') yields ~/Downloads/air-routes.graphml (No such file or directory) ```~ % curl https://raw.githubusercontent.com/krlawrence/graph/refs/heads/master/sample-data/air-routes.graphml -o air-routes.graphml % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed...
Solution:
Using master branch I was able to see the error you had when using an incorrect file path but then the console succeeded after I modified the file path to point to the file I downloaded from Kelvin's repository: ``` Connected to the target VM, address: '127.0.0.1:53213', transport: 'socket' ,,,/...

Neptune, Gremlin Java & Bindings

Hey, I've got a bit of an issue that I'm trying to find a solution for regarding the use of bindings in Gremlin with Neptune. As stated in the docs, they're not supported. What I'd like to get to is a workaround solution where I can locally apply bindings to a query, convert it to a string and submit it to Neptune with the bindings "applied". ...
Solution:
@G.V() - Gremlin IDE (Arthur) with a small modification, it's possible to change the existing translators in 3.x to replace variable placeholders for the values in the bindings. adding this override to GroovyTranslator.DefaultTypeTranslator: ``` @Override protected Script convertToScript(final Object object) { if (object instanceof Bytecode.Binding) {...

Hot reloading of SSL certificates in gremlin-server

👋🏻 Hey. I'm trying to understand how SSL/TLS certificates are handled in TinkerPop. Based on this code (https://github.com/apache/tinkerpop/blob/9627b78bcf38a0faf6a94dcd8ae3b80390d837f7/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java#L324-L354), keystore files (certificates) are loaded once, on Channel initialization. This would mean that a Channel keeps using the same certificate for its lifespan and, assuming they are long-lived, I imagine this could be an issue if users want to refresh their certificates often. ...

I am not sure how to use mergeE and mergeV using gremlin_python

I am using janusgraph with cassandra for my project and I want to implement upsert functionality. For that I didn't find much resources, only this gist (https://gist.github.com/spmallette/5cd448f38d5dae832c67d890b576df31) . From that, I wrote certain code which does work. The code looks like this ``` For vertex/node g.merge_v({T.id: node.id}).option( Merge.on_create, {...

Gremlin-JavaScript Global Websocket

I’m just wondering if there is a reason the gremlin-JavaScript 3.7 branch does not pass options/headers to the globalThis.WebSocket if defined?

How to dynamically add custom Steps at runtime?

I am maintaining a graph engine service that provides different products. I have found that some complex scenarios cannot get query results through native Steps. Special business logic operations are required to implement custom special syntax through business code. The current custom syntax is done through @GremlinDsl, which is generated at compile time and the code is written in my own service. I hope that this special syntax can be defined by the product itself and pushed to the specified dir...
Solution:
You can use Groovy for all manner of trickery (AST manipulation, basic metaprogramming APIs, etc), but I'd take care with depending on it given the security risks associated with it. TinkerPop has been slowly moving away from it, first with bytecode based requests and more currently with the Gremlin ANTLR grammar. There is a general consensus that the latter will ultimately replace groovy/bytecode going forward into the future. I'm not sure if any of that impacts your decisions on how to maintai...

Graph computer question

In some cases TinkerGraphComputer removes duplicates from input, is this a bug or a feature? For example gremlin> g.V(1,1).count() ==>2 gremlin> g.withComputer().V(1,1).count()...
Solution:
i'd say this is the bug:
gremlin> g.V(1,1).count()
==>2
gremlin> g.V(1,1).count()
==>2
i wonder when that got introduced..........

TypeScript incomplete declaration of Traverser

This is a bit of a small (and probably dumb) question, as I'm new to TypeScript. I'm having trouble compiling my TypeScript code, translating it from Javascript. I see that toList returns an instance of Promise<Traverse[]>, which is fine and dandy, but it looks like several bits of documentation have get as an method to retrieve a specific object. ``` const { graph: orgDb, client: nClient } = connectNeptune(); const dept_and_div = (await orgDb.V().has('email', "[email protected]") .inE('manages').outV().valueMap()...

How to create indexes by Label?

In search of performance improvements, the AWS Neptune experts suggested that I create some indexes. To better contextualize, I have 3 operations in a single POST endpoint with the database. A query of previous data bringing the relationships of a specific ID, a deletion of edges if there is a registration in the database and a registration/update of vertices and edges. Today I am trying to attack two problems. Improve the performance of the creation that takes approximately 150ms and improve the performance of the query that is currently bogging down between 1.2-17 seconds.
Is it possible to create an index for vertexes and edges by specifying them by label since I have vertices and edges with different labels that have different properties? Does anyone know what this implementation would look like? In my current implementation I do it in a simple way as follows: ...

Parameterized edges creation in existing graph

Hi :gremlin_smile: , I'm currently experimenting with Janusgraph. My graph is a directed hierachical graph coming straight from parsing an XML file. After this first bulk load, I want to add multiple new edges between vertices to create shortcuts or remove property duplication. This was easily done using Cypher and a double MATCH but struggle to do the same thing in Gremlin. I created a small dataset in Gremlify https://gremlify.com/jf036ue70jj/4 ...

Neo4j Chypre convention in to gremlin query

We are trying to convert the Neo4j chypre query into a Gremlin query, but we are stuck on some extract methods in the chypre query that need to be converted into the Gremlin query. The chypre query follows: `` MATCH (from: Person {title: "John"}), (to: Location` {title: "New York City"}) MATCH p = (from)-[rel*..5]->(to)...

How to Work with Transactions with Gremlin Python

I`m trying to implement transactions but I have two scenarios. I start a transaction but when I use iterate on every add_v it saves on my gremlin_server before the commit. The second situation is if if take out the .iterate() and run a commit() it doenst save on gremlin-server. What am I doing wrong?...
No description

mergeV with onMerge when extra properties are unknown

I'm in the following situation: ``` jobId = "spark:bdx_job_1" ...

Using java/gremlin inside python with Jpype!

I recently experimented with using Jpype to give the python world at my day job access to Sqlg. It seems a very easy and powerful way to give python code full access to the any java api. In my case I am making SqgGraph available to python. It is about 5 lines of setup code and voila, the python code has the same functionality as native java. Does anyone use Jpype, anything caveats I should know about?...

Structure Test Suite - Test Data Types and Serialization Types Don't Match?

This issue is based on some assumptions I've and knowledge from my team. Correct me please if any of it is wrong or misguided. An ongoing thing we're doing is better supporting the structure testing suite and having a more accurate features list for our Graph. Array types are supported by our Graph, and the way we handled it is by using Lists, since when GLVs serialize property values of type array or list they come in as an ArrayList. However, the structure test suite, namely PropertyTest, sends the property value type directly to the graph as int[]{1, 2, 3} for example which breaks our Graph since we only expected ArrayList due to the expectation of serialization....

What's the significance of done: false ? (after calling .next())

Hi, I've encountered a query that I execute, and it usually never returns "done" false. But in a specific case, it does. I run 2 queries, and sometimes I'm not calling .next() or any terminal steps. ...
Next