Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gremlin to cypher #361

Open
Hashdhi opened this issue Aug 1, 2021 · 2 comments
Open

gremlin to cypher #361

Hashdhi opened this issue Aug 1, 2021 · 2 comments

Comments

@Hashdhi
Copy link

Hashdhi commented Aug 1, 2021

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
Copy link

hvub commented Aug 4, 2021

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
Copy link
Author

Hashdhi commented Aug 4, 2021

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')."
+ "out('EntityHasSpecifications').in('EntitySpecTypedAs')

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants