Skip to main content

Gremlin Graph Search

Graph Search is a powerful way of analyzing your data and building up an Enterprise Intelligence Graph.

Written by Kristine Marhilevica

When you are putting data into Ardoq you are essentially building up an Enterprise Intelligence Graph. This provides an always up-to-date Digital Twin of all data, processes, and their relationships, meaning you can ask the system about all parts of your documentation.

We use the graph traversal language Gremlin (external article) to write queries in Ardoq. This helps you navigate the vertices and edges of your Enterprise Intelligence Graph.

Tip: Use our selection of common queries as inspiration to build your own based on your data sets.

Table of contents:


Before Getting Started

To create Gremlin queries, you must have the Create Gremlin privilege enabled. This privilege can be assigned to an entire user role or granted individually per user.

⚠️ IMPORTANT: The Gremlin privilege permits Writer users to view data in the entire graph, ignoring existing workspace permissions. It should ONLY be enabled for users with high trust. For example, users who might have otherwise had the Admin role but who can now accomplish their responsibilities as Writers with Gremlin access.

How to Allow Users to Create Gremlin Queries

If you are an admin user in Ardoq, you can allow users to create Gremlin queries by enabling the Create Gremlin privilege. This can be configured either globally across an entire user role or granted individually per user.

How to Enable The “Create Gremlin” Privilege on a User Role

To allow all users with a specific role to create Gremlin queries:

  1. Navigate to My Organization > Admin > Access Control > Roles.

  2. Select the user role you want to configure.

  3. Check the Create Gremlin checkbox.

  4. Click Save changes.

Enabling the Create Gremlin privilege on a user role is the most efficient way to manage query-creation permissions across your organization. Note that once this privilege is enabled for a specific user role, it cannot be disabled for individual users assigned to that role.

For example, if you enable the Create Gremlin privilege on the Writer user role, all current and future Writer users will automatically gain the ability to create Gremlin queries. Because this permission is applied at the role level, you will not be able to revoke the Create Gremlin privilege from individual users who hold the Writer role.

How to Enable the “Create Gremlin” Privilege per Single User

Enable the Create Gremlin privilege for individual users when specific team members need query creation access, but their assigned user role does not include it.

To enable the Create Gremlin privilege for an individual user:

  1. Navigate to My Organization > Admin > Access Control > Users.

  2. Locate the specific user you want to update.

  3. Click the three-dot menu next to their name and select Assign Privileges.

  4. Select Create Gremlin from the dropdown menu.

  5. Click Assign Privileges to save.

How to Create a Gremlin Query

You can query your data by running a quick search:

  1. Navigate to Reports from the sidebar.

  2. Click Advanced and select Gremlin Graph Search.

Note: To keep your query for future use, you must save it as a report.

  1. Navigate to either the Asset Library or Reports from the sidebar.

  2. In the top-right corner of the screen, click Create new and select Report.

  3. Under the Data Selection section, select the workspace(s) you wish to query.

  4. Go to the Custom Data Query section and select Gremlin Graph Search.

  5. Input your Gremlin script directly into the query editor.

The following example demonstrates how to identify which applications will be impacted if a specific server fails.

g.V().
has('name', 'mongodb-1').
both().
hasLabel('Application').
dedup()

You can view the query results in either the Preview Search Results modal or the Data Presentation section of the Report Builder.

Save your report to preserve your query for future use. You can then locate it by filtering the Asset Library page by Report, or by navigating directly to the Reports page.

Note that this can be a bit confusing if you are new to Gremlin, so please don't hesitate to reach out for more information and help with queries.

Manage Reports

To manage your reports, navigate to Reports from the sidebar menu. Alternatively, go to the Asset Library page and filter the view by Reports.

Additionally, you can add reports to a dashboard to view multiple reports simultaneously in a simplified layout. To find your dashboards, navigate to Dashboard from the sidebar menu, or go to the Asset Library and filter the view by Dashboards.

To inspect the underlying data of any report in your dashboard, hover over its chart widget and click either Expand Widget (⭕️) or the Report (🟥) button.

FAQ

  • Where can I learn more about Gremlin?

    • For an advanced understanding of Gremlin language, please refer to the official Tinkerpop documentation.

    • Here are the Ardoq reserved fields and how to call them using Gremlin:

Reserved Field

How to call it

Ardoq OID

id()

Ardoq ID

component-key

Created at

created

Updated at

last-updated

Created by

createdByName

Last Updated By

lastModifiedByName

Created by (Email)

createdByEmail

Last Updated By (Email)

lastModifiedByEmail

Workspace ID

rootWorkspace

Type

label()

  • Can Gremlin be used to retrieve a count for the number of Broadcasts/Surveys for a given component?

    • No, it is currently not possible to use Gremlin to retrieve a count of the number of Broadcasts/Surveys that have been sent for a given component.

Did this answer your question?