queries
Creates, updates, deletes, gets or lists a queries resource.
Overview
| Name | queries |
| Type | Resource |
| Id | aws.neptune_graph.queries |
Fields
The following fields are returned by SELECT queries:
- get_query
- list_queries
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the query in question. |
elapsed | integer | The number of milliseconds the query has been running. |
query_string | string | The query in question. |
state | string | State of the query. (RUNNING, WAITING, CANCELLING) |
waited | integer | Indicates how long the query waited, in milliseconds. |
| Name | Datatype | Description |
|---|---|---|
queries | array | A list of current openCypher queries. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_query | select | graphIdentifier, query_id, region | 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. | |
list_queries | select | graphIdentifier, maxResults, region | state | Lists active openCypher queries. |
cancel_query | exec | graphIdentifier, query_id, region | Cancels 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.
| Name | Datatype | Description |
|---|---|---|
graphIdentifier | string | The unique identifier of the Neptune Analytics graph. |
maxResults | integer | The maximum number of results to be fetched by the API. |
query_id | string | The unique identifier of the query to cancel. |
region | string | AWS region (default: us-east-1) |
state | string | Filtered list of queries based on state. |
SELECT examples
- get_query
- list_queries
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
;
Lists active openCypher queries.
SELECT
queries
FROM aws.neptune_graph.queries
WHERE graphIdentifier = '{{ graphIdentifier }}' -- required
AND maxResults = '{{ maxResults }}' -- required
AND region = '{{ region }}' -- required
AND state = '{{ state }}'
;
Lifecycle Methods
- cancel_query
Cancels a specified query.
EXEC aws.neptune_graph.queries.cancel_query
@graphIdentifier='{{ graphIdentifier }}' --required,
@query_id='{{ query_id }}' --required,
@region='{{ region }}' --required
;