Amazon Neptune · Arazzo Workflow

Amazon Neptune Gremlin Query with Status Check

Version 1.0.0

Run a Gremlin traversal via the Data API and confirm the engine and query queue are healthy.

1 workflow 1 source API 1 provider
View Spec View on GitHub DatabaseGraph DatabaseGremlinNeptuneProperty GraphRDFSPARQLArazzoWorkflows

Provider

amazon-neptune

Workflows

gremlin-query-with-status
Verify engine health, execute a Gremlin traversal, and inspect the query queue.
Checks Neptune engine status, runs a Gremlin traversal through the Data API, and reads the Gremlin query status surface to report queue depth.
3 steps inputs: gremlin outputs: engineStatus, requestId, result, runningQueryCount
1
checkEngine
getEngineStatus
Confirm the Neptune engine is available and report its role and version before running the traversal.
2
runGremlin
executeGremlinQuery
Execute the supplied Gremlin traversal against the property graph and capture the request id and result payload.
3
inspectQueue
getGremlinQueryStatus
Read the Gremlin query status surface to see how many queries are running and accepted right now.

Source API Descriptions

Arazzo Workflow Specification

amazon-neptune-gremlin-query-with-status-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Amazon Neptune Gremlin Query with Status Check
  summary: Run a Gremlin traversal via the Data API and confirm the engine and query queue are healthy.
  description: >-
    Submits a Gremlin traversal to the Neptune Data API and pairs it with the
    query-engine status surface so the result can be trusted. The workflow first
    confirms the Neptune engine is healthy, then executes the supplied Gremlin
    traversal, and finally inspects the running/accepted query counts so a caller
    can tell whether the cluster is saturated. Every step spells out its request
    inline so the flow can be read and executed without opening the underlying
    OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: neptuneDataApi
  url: ../openapi/amazon-neptune-data-openapi.yml
  type: openapi
workflows:
- workflowId: gremlin-query-with-status
  summary: Verify engine health, execute a Gremlin traversal, and inspect the query queue.
  description: >-
    Checks Neptune engine status, runs a Gremlin traversal through the Data API,
    and reads the Gremlin query status surface to report queue depth.
  inputs:
    type: object
    required:
    - gremlin
    properties:
      gremlin:
        type: string
        description: The Gremlin traversal string to execute (e.g. g.V().count()).
  steps:
  - stepId: checkEngine
    description: >-
      Confirm the Neptune engine is available and report its role and version
      before running the traversal.
    operationId: getEngineStatus
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      engineStatus: $response.body#/status
      role: $response.body#/role
  - stepId: runGremlin
    description: >-
      Execute the supplied Gremlin traversal against the property graph and
      capture the request id and result payload.
    operationId: executeGremlinQuery
    requestBody:
      contentType: application/json
      payload:
        gremlin: $inputs.gremlin
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      requestId: $response.body#/requestId
      result: $response.body#/result/data
  - stepId: inspectQueue
    description: >-
      Read the Gremlin query status surface to see how many queries are running
      and accepted right now.
    operationId: getGremlinQueryStatus
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      runningQueryCount: $response.body#/runningQueryCount
      acceptedQueryCount: $response.body#/acceptedQueryCount
  outputs:
    engineStatus: $steps.checkEngine.outputs.engineStatus
    requestId: $steps.runGremlin.outputs.requestId
    result: $steps.runGremlin.outputs.result
    runningQueryCount: $steps.inspectQueue.outputs.runningQueryCount