Skip to content

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

  1. Create a new directory named data at the root of the aerospike-graph directory.

  2. Create two subfolders and name one edges and the other vertices. The directory structure should look like this:

    data
    ├── edges
    └── vertices

    This is the directory structure used for bulk loading data.

  3. Download the two Air Routes .csv data files (right-click and save as):

  4. Move air-routes-latest-edges.csv into the edges directory and air-routes-latest-nodes.csv into the vertices 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.

  5. Modify the docker-compose.yaml file.

    1. Open the docker-compose.yaml file, located at the root of the aerospike-graph directory.
    2. After line 36, add the following line:
      docker-compose.yaml
      - ./data:/opt/aerospike-graph/data
      This instructs Docker to take the contents of the data folder and place it into opt/aerospike-graph/data within the container.
  6. Run Docker compose again to bind the data directory to the Docker container:

    Terminal window
    docker compose up -d

    After 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.

Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?