Load data
Set up Gremlin Console
-
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.
-
Unzip the downloaded package to a directory of your choice.
-
Navigate to the Gremlin Console application folder and start the console with the following command:
Terminal window ./bin/gremlin.sh -
Connect to the running AGS Docker image.
g = traversal().withRemote(DriverRemoteConnection.using("localhost", 8182, "g"));Example response graphtraversalsource[emptygraph[empty], standard]
Load the data
-
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. -
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=successOnce the
status
field is set tosuccess
, the data has been loaded successfully.