Organisations with the Ardoq Graph feature can also access their graph with a plain Gremlin Client. This enables you to take advantage of all the Gremlin Query features, such as the explain() step.

You connect to the Ardoq Graph using a standard Apache Tinkerpop Gremlin Console, which you can download from here: http://tinkerpop.apache.org/.

The queries made through the Gremlin Console is read only, and will not in any case edit or write over anything.

Setup

Gremlin Console needs a configuration to set up the remote connection to Ardoq. You can generate a pre-populated configuration from your Account Settings, under the API and Tokens tab as illustrated below:


Select the Tinkperpop version that matches your download, and copy and paste the configuration into a file ardoq-remote.yaml in the conf folder in your Gremlin Client installation.

Download the public certificate to ensure your connection is secure:
wget -P conf https://s3-eu-west-1.amazonaws.com/ardoq-public/ardoq-trust-certificate.pem

For Tinkerpop version 3.3.3 and older:

The ardoq-remote.yaml includes a reference to ardoq-trust-certificate.pem , and expects the certificate to also be located in the conf folder.

For Tinkerpop version newer than 3.3.4, the config requires trustStore parameters, where the path and password must match with the configuration:

$keytool -import -v -trustcacerts -alias ardoq-ca -file conf/ardoq-trust-certificate.pem -keystore conf/ardoq-truststore.jks -noprompt -storepass <provide your trust store password here>


Connect to Ardoq

Start the Gremlin Console

~/gremlin-console$ bin/gremlin.sh

         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.gephi
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin>

Connect to Ardoq

gremlin> :remote connect tinkerpop.server conf/ardoq-remote.yaml

Run a remote query using the remote operator :> 

gremlin> :> g.V().count()
==>14068


To execute all queries remotely, use :remote console  

gremlin> :remote console
==>All scripts will now be sent to Gremlin Server - [app.ardoq.com/52.212.34.135:443] - type ':remote console' to return to local mode
gremlin> g.V().count()
==>14068 
Did this answer your question?