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
dataat the root of theaerospike-graphdirectory. -
Create two subfolders and name one
edgesand 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.csvinto theedgesdirectory andair-routes-latest-nodes.csvinto theverticesdirectory.For AGS to access the air routes data the new
datadirectory must be bound to the/opt/aerospike-graph/datadirectory in the Docker container./opt/aerospike-graph/datais the directory where AGS expects the data to be. -
Modify the
docker-compose.yamlfile.- Open the
docker-compose.yamlfile, located at the root of theaerospike-graphdirectory. - 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/datawithin the container.
- Open the
-
Run Docker compose again to bind the
datadirectory 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.