Cypher for Gremlin
Cypher for Gremlin is a toolkit for users of Apache TinkerPop™ that allows querying Gremlin databases with Cypher, the industry's most widely used property graph query language defined and maintained by the openCypher project.
The toolkit is composed of:
- translation: Cypher to Gremlin translation library for Java
- tinkerpop/cypher-gremlin-extensions: Cypher-specific custom functions and predicates for Gremlin
- tinkerpop/cypher-gremlin-server-plugin: Gremlin Server plugin that enables Cypher query processing (also includes Cypher extensions above)
- tinkerpop/cypher-gremlin-console-plugin: Gremlin Console plugin that enables client-side translation of Cypher queries or communication with a Cypher-enabled Gremlin Server
- tinkerpop/cypher-gremlin-server-client: Gremlin Server client wrapper that can send Cypher queries to a Cypher-enabled Gremlin Server
- tinkerpop/cypher-gremlin-neo4j-driver: Neo4j Java API wrapper for users familiar with Neo4j
The fastest way to start experimenting with Cypher for Gremlin is with the Gremlin Console Cypher plugin. Follow the link for installation and usage instructions.
You can also take a look at the Cypher for Gremlin Demo project.
With Cypher for Gremlin you can use the following Cypher language features:
OPTIONAL MATCHwith most of the pattern-matching syntax, except for variable-length patterns
UNWINDprojections, including basic support for list and path comprehensions
It is not guaranteed that all instances and combinations of the listed features will work. However, the produced translation covers around 70% of the Cypher Technology Compatibility Kit and an additional 15% on Gremlin Servers with Cypher extensions. Note that latest TCK M11 covers Temporal types and functions support of which is currently not implemented in Cypher for Gremlin. Coverage of TCK M10:
You are very welcome to report any issues with the translation that you encounter.
- Some functionality is exclusive to Gremlin Servers with Cypher extensions, commonly provided by the Cypher Gremlin Server plugin.
- Modification of labels is not supported, because labels are immutable in Gremlin.
- For more details refer to list of scenarios in Cypher TCK without known translation to Gremlin.
See the current TCK report for a detailed overview of language coverage.
- Gizmo is a Web UI that makes it easy to interact with TinkerPop graph databases such as AWS Neptune and Azure CosmosDB with the Cypher query language. Uses Cypher Gremlin Neo4j Driver for translation.
To build and run Cypher for Gremlin you need Java 8. The project is built using Gradle or the provided wrapper.
To build and run unit and integration tests:
To automatically fix formatting errors in your changes:
How to contribute
We would love to find out about any issues you encounter and are happy to accept contributions following a Contributors License Agreement (CLA) signature as per the process outlined in our contribution guidelines.
The project is licensed under the Apache Software License, Version 2.0
© Copyright 2018 Neo4j, Inc.
Apache TinkerPop™, TinkerPop, and Apache are registered trademarks of the Apache Software Foundation.