Anant example-janusgraph-notebook
License: Apache License 2.0
Language: Jupyter Notebook
A tutorial for running JanusGraph on Cassandra and Elasticsearch, and then integrating within AWS Graph Notebook.
For more information, see the blog post.
Start everything using docker-compose
docker-compose up -d
You can now find it open in http://localhost:8888
Login using password: tensorflow
Out of the box, the Graph Notebook lib provides dozens of notebooks to try out. Unfortunately those with seed data for loading into your graph mostly don't work since they use custom string ids, and JanusGraph doesn't support that.
However, you can load in the air routes data manually using the commands below, which will allow you to use the Air-Routes-Gremlin
notebook
./scripts/load-in-airroutes.sh
docker cp ./tmp jg-notebook-janusgraph:/opt/tmp/
docker exec -it jg-notebook-janusgraph ./bin/gremlin.sh
:remote connect tinkerpop.server conf/remote.yaml
g = traversal().withRemote('conf/remote-graph.properties')
path = "/opt/tmp/air-routes.xml";
g.io(path).read().iterate();
Run this at the top of any notebook that you try. Do it here as well.
%%graph_notebook_config
{
"host": "janusgraph",
"port": 8182,
"ssl": false,
"gremlin": {
"traversal_source": "g"
}
}
Example of how this works is given here: http://localhost:8888/notebooks/notebooks/sample-config.ipynb
You can find it here: http://localhost:8888/notebooks/notebooks/sample-config.ipynb
Want to just use your standard Gremlin console for whatever reason?
docker exec -it jg-notebook-janusgraph ./bin/gremlin.sh
:remote connect tinkerpop.server conf/remote.yaml
g = traversal().withRemote('conf/remote-graph.properties')
# g.V() or whatever you want to run
Based heavily on:
Join Our Newsletter!
Sign up below to receive email updates and see what's going on with our company.