This demo is intended to help get you started with DSE Graph. It includes schemas, data, and mapper script for the DataStax Graph Loader.
LICENSE: Apache 2.0
###About the Data The data comes to us from the pokeapi. I took the liberty of cleaning the data files and choosing the ones that had relationships applicable to a graph database. I've also changed the file and header names to help new comers better understand what's happening inside DSE Graph.
###Issues
- Some data needs to be cleaned further for null property values
###Prerequisites
- Learn some Graph <- this will give you ideas on how to query this graph
- DataStax Graph Loader
- DataStax Enterprise 5.0 or greater
- DataStax Studio 1.0 or greater
###How-to:
- Start DataStax Enterprise in graph mode mode
- Start DataStax Studio - on your local machine it'll bind to http://localhost:9091
- Edit
poke_mapper.groovy
so that the paths for inputfileV and inputfileE files ='/path/to/this/directory/data/'
##Let's get started
#####In DataStax Studio create a new connection with a new graph called 'poke_graph' (or what ever you want the graph to be called)
#####Next, paste the schema from the schema.groovy
file into a new gremlin box:
If you'd like to add more indices for different types of traversals, you can always add them after the fact. The ones in the schema file are for the Graph Loader to do look ups and match vertices to edges.
#####Click the real-time
play button to execute. When it finishes, hit the schema
button at the top right of Studo.
Note, there's plenty of other connections we can make with this dataset. Feel free to explore and play around!
###Now we're going to load the data
sudo ./graphloader /path/to/poke_mapper.groovy -graph poke_graph -address localhost -abort_on_prep_errors false
Some of the properties within the CSV files contain empty fields which is OK for this demo but will cause errors. This is why we set the -abort_on_prep_errors
flag
###Play time! Remember that Studio truncates results to 1000 by default.