Prepare data
This last section of the quick start walks through importing a larger data set and running queries with the Gremlin console.
Air Routes data
Data loading is an important step when it comes to working with graph databases. Read more about AGS data loading here.
Kelvin Lawrence has compiled and made public a data set designed for use with a graph database. It contains information about airlines, airports around the world, and the routes between them. The data set is large enough to be interesting and useful, while still small enough to be practical for testing and experimentation purposes.
Expose the Air Routes data set to Docker
-
Create a new directory named
data
at the root of theaerospike-graph
directory. -
Create two subfolders and name one
edges
and the othervertices
. The directory structure should look like this:data├── edges└── verticesThis is the directory structure used for bulk loading data.
-
Download the two Air Routes .csv data files (right-click and save as):
-
Move
air-routes-latest-edges.csv
into theedges
directory andair-routes-latest-nodes.csv
into thevertices
directory.For AGS to access the air routes data the new
data
directory must be bound to the/opt/aerospike-graph/data
directory in the Docker container./opt/aerospike-graph/data
is the directory where AGS expects the data to be. -
Modify the
docker-compose.yaml
file.- Open the
docker-compose.yaml
file, located at the root of theaerospike-graph
directory. - After line 36, add the following line:
This instructs Docker to take the contents of the data folder and place it into
docker-compose.yaml - ./data:/opt/aerospike-graph/dataopt/aerospike-graph/data
within the container.
- Open the
-
Run Docker compose again to bind the
data
directory to the Docker container:Terminal window docker compose up -dAfter the Docker container starts, the .csv files are now available in the Docker container at
/opt/aerospike-graph/data
. For more information about the AGS Docker directory structure, see Directory structure examples.