Skip to content

Execute Graph Query (Graph DB) v1.0.0 Help

Executes Graph queries against graph databases.

How can I use the Step?

You can use the Step to manage graph databases in the Graph service. The Step lets you execute Graph queries against the specific graph database.

Note: The Step currently supports the following queries.

Prerequisites

The Step requires a graph database in the Graph service.

Query settings

The Step supports the openCypher query language, providing an intuitive way to work with property graphs. OpenCypher is the best on-ramp to the graph query language standard developed by ISO. For more information, see the openCypher documentation.

To set up the section, do the following:

  1. From the Database name dropdown, select an appropriate database against which to run the Graph query.
  2. Optional: From the Saved query dropdown, select one of the previously saved queries in the Graph service. This query automatically populates the Query field.
  3. In the Query field, provide the Graph query you want to execute. You can enter it manually or use the Merge field.

Note: The query request is limited to 30 seconds. If the query exceeds this limit, the Step throws a socket hang-up error, and the Flow proceeds down the error exit. Despite this, the query continues running in the background, so you can not track whether it was successful or failed. To avoid this scenario, build queries that are within the 30-seconds limit.

Merge field settings

The Step returns the result as a JSON object and stores it under the Merge field variable. This way, you can access the output JSON object from any point of your Flow.

Output example

The output depends on the development and the settings you provide. It contains information about the Graph query you execute.

For example, if you run the following Graph query:

sql
MATCH (n) RETURN distinct labels(n)
MATCH (n) RETURN distinct labels(n)

The Step returns the labels of all nodes:

json
{
  "records": [
    {
      "distinct_labels_n_": ["label_1"]
    },
    {
      "distinct_labels_n_": ["label_2"]
    },
    ...
  ]
}
{
  "records": [
    {
      "distinct_labels_n_": ["label_1"]
    },
    {
      "distinct_labels_n_": ["label_2"]
    },
    ...
  ]
}

Error Handling

By default, the Step handles errors using a separate exit. So if any error occurs during the Step execution, the Flow proceeds down the error exit.

Note: If you disable the Handle error toggle, the Step does not handle errors. With this setup, if any error occurs during the Step execution, the Flow fails immediately after exceeding the Flow's timeout. To prevent the Flow from being suspended while continuing to handle errors in the Flow, place the Flow Error Handling Step before the main Flow logic.

Reporting

The Step reports once after its execution. You can change the Step log level and add new tags in the section.

Log level

By default, the Step inherits its log level from Flow's log level. You can change the Step's log level by selecting an appropriate option from the Log level list.

Tags

Tags help organize and filter session information when generating reports. When adding a new tag, you can specify the tag category, label, and value.

Service dependencies

  • studio v3.18.0
  • sdk api v2.13.0
  • graphdb v2.0.2

Release notes

v1.0.0

  • Initial release