Skip to main content

queries

Creates, updates, deletes, gets or lists a queries resource.

Overview

Namequeries
TypeResource
Idaws.neptune_graph.queries

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the query in question.
elapsedintegerThe number of milliseconds the query has been running.
query_stringstringThe query in question.
statestringState of the query. (RUNNING, WAITING, CANCELLING)
waitedintegerIndicates how long the query waited, in milliseconds.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_queryselectgraphIdentifier, query_id, regionRetrieves the status of a specified query. When invoking this operation in a Neptune Analytics cluster, the IAM user or role making the request must have the neptune-graph:GetQueryStatus IAM action attached.
list_queriesselectgraphIdentifier, maxResults, regionstateLists active openCypher queries.
cancel_queryexecgraphIdentifier, query_id, regionCancels a specified query.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
graphIdentifierstringThe unique identifier of the Neptune Analytics graph.
maxResultsintegerThe maximum number of results to be fetched by the API.
query_idstringThe unique identifier of the query to cancel.
regionstringAWS region (default: us-east-1)
statestringFiltered list of queries based on state.

SELECT examples

Retrieves the status of a specified query. When invoking this operation in a Neptune Analytics cluster, the IAM user or role making the request must have the neptune-graph:GetQueryStatus IAM action attached.

SELECT
id,
elapsed,
query_string,
state,
waited
FROM aws.neptune_graph.queries
WHERE graphIdentifier = '{{ graphIdentifier }}' -- required
AND query_id = '{{ query_id }}' -- required
AND region = '{{ region }}' -- required
;

Lifecycle Methods

Cancels a specified query.

EXEC aws.neptune_graph.queries.cancel_query
@graphIdentifier='{{ graphIdentifier }}' --required,
@query_id='{{ query_id }}' --required,
@region='{{ region }}' --required
;