opencypher / cypher-for-gremlin

Cypher for Gremlin adds Cypher support to any Gremlin graph database.
Apache License 2.0
359 stars 48 forks source link

gremlin to cypher #361

Open Hashdhi opened 3 years ago

Hashdhi commented 3 years ago

our system is using a graph database( not neo4j )and it's live . Wanted to migrate it to Neo4j.

we have used gremlin for graph traversal and approximately 10000 gremlin traversal queries(read intensive system) and impossible to translate each and every query to cypher . It will lead to a very big change in the system , testing etc .

Hence we are looking for a gremlin to cypher translator which is something similar to open cypher library which converts cypher to gremlin. Input is cypher query string and output is gremlin.

Similarly if we have any such library for taking gremlin query string as input and converting it to cypher query string so that we can seamlessly migrate our system.

hvub commented 3 years ago

Hi Hashdhi,

the best is probably to ask in the Neo4j community forum, but it seems you have already done that: https://community.neo4j.com/t/gremlin-to-cypher-query/40243/1

This steelbridge thing Michael points to looks like what you are looking for, but unfortunately does not exist anymore. Bad luck, sorry.

I do not know of anything else.

Hashdhi commented 3 years ago

have got 0.4.6 version of neo4j-gremlin-bolt As Michael mentioned its relied on a lot of roundtrips. if gremlin query has multiple traversal steps for each step cypher statement gets generated and executed . so it wont fit due to which the project (neo4j-gremlin-bolt) might have reached abandoned state.

e.g. g.V().has('Service','name',serviceName).in('ServiceComposedOf').in('ConfigAssignedwithEntity')."

Generated Cypher statement : MATCH (n) RETURN n MATCH (n:Service)<-[r:ServiceComposedOf]-(m) WHERE ID(n) = $id RETURN m MATCH (n:ServiceConfiguration)<-[r:ConfigAssignedwithEntity]-(m) WHERE ID(n) = $id RETURN m MATCH (n:Service)-[r:EntityHasSpecifications]->(m) WHERE ID(n) = $id RETURN m MATCH (n:Circuit)-[r:EntityHasSpecifications]->(m) WHERE ID(n) = $id RETURN m MATCH (n:Service)-[r:EntityHasSpecifications]->(m) WHERE ID(n) = $id RETURN m MATCH (n:ServiceSpec)<-[r:EntitySpecTypedAs]-(m) WHERE ID(n) = $id RETURN m MATCH (n:LogicalConnectionSpec)<-[r:EntitySpecTypedAs]-(m) WHERE ID(n) = $id RETURN m MATCH (n:ServiceSpec)<-[r:EntitySpecTypedAs]-(m) WHERE ID(n) = $id RETURN m