Skip to content

Load data

Set up Gremlin Console

  1. Download the latest version of the Gremlin Console from the Apache website.

    Gremlin Console is a command-line interface for interacting with graph databases using the Gremlin query language.

  2. Unzip the downloaded package to a directory of your choice.

  3. Navigate to the Gremlin Console application folder and start the console with the following command:

    Terminal window
    ./bin/gremlin.sh
  4. Connect to the running AGS Docker image.

    g = traversal().withRemote(DriverRemoteConnection.using("localhost", 8182, "g"));
    Example response
    graphtraversalsource[emptygraph[empty], standard]

Load the data

  1. Load the air-routes data set into AGS with the following command in the Gremlin console:

    g.with("evaluationTimeout", 30000) \
    .call("aerospike.graphloader.admin.bulk-load.load") \
    .with("aerospike.graphloader.vertices", "/opt/aerospike-graph/data/vertices") \
    .with("aerospike.graphloader.edges", "/opt/aerospike-graph/data/edges").next()
    Example response
    ==>Bulk load started successfully. Use the g.call("aerospike.graphloader.admin.bulk-load.status") command to get the status of the job.
  2. Check the status of the bulk load job with the following command:

    g.call("aerospike.graphloader.admin.bulk-load.status").next()
    Example response
    ==>duplicate-vertex-ids=0
    ==>bad-edges=0
    ==>step=done
    ==>bad-entries=0
    ==>complete=true
    ==>status=success

    Once the status field is set to success, the data has been loaded successfully.

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?