Gremlin is the graph database query language that is used to interact with JanusGraph. One method of putting Gremlin code in JanusGraph is to use Gremlin Console that is being provided by the JanusGraph which comes with JanusGraph plugin. The Gremlin console is a very useful interactive environment for directly writing Gremlin query to create graph schema, load data, administer graph, and retrieval traversal results.
- Clone JanusGraph from its GitHub repository https://github.com/JanusGraph/janusgraph/
- Run mvn clean install -DskipTests=true command on your console. You need to be inside Janusgraph folder to run this command. -DskipTest=true would skip all the test from the build. If you want to run test, you can run it but it would take around 5 hours for all tests. It will take around 25 minutes to build even with -DskipTest=true.
- Once step two completed successfully, navigate to bin folder. bin folder only gets created when the step 2 gets completed successfully.
- run the ./gremlin.sh command on your console. If your are not inside the bin folder. You can run bin/gremlin.sh command from your console.
- The console output looks like follows
Note: Six plugins are activated by default, as shown. The Gremlin Server, tinker pop.server, is started so that commands can be issued to JanusGraph. The utilities plugin, tunkerpop.utilities provides various functions, helper methods and imports of external classes that are useful in Gremlin console.
Discover all Gremlin console commands with help. Console commands are not Gremlin language commands, but rather commands issue to Gremlin console for shell functionality. The Gremlin console is based on Groovy Language.