2024/02/12 - Amazon Neptune Graph - 1 updated api methods
Changes Adding a new option "parameters" for data plane api ExecuteQuery to support running parameterized query via SDK.
{'parameters': {'string': {}}}
Execute an openCypher query. Currently, the SDK does not support parameterized queries. If you want to make a parameterized query call, you can use an HTTP request.
When invoking this operation in a Neptune Analytics cluster, the IAM user or role making the request must have a policy attached that allows one of the following IAM actions in that cluster, depending on the query:
neptune-graph:ReadDataViaQuery
neptune-graph:WriteDataViaQuery
neptune-graph:DeleteDataViaQuery
See also: AWS API Documentation
Request Syntax
client.execute_query( graphIdentifier='string', queryString='string', language='OPEN_CYPHER', parameters={ 'string': {...}|[...]|123|123.4|'string'|True|None }, planCache='ENABLED'|'DISABLED'|'AUTO', explainMode='STATIC'|'DETAILS', queryTimeoutMilliseconds=123 )
string
[REQUIRED]
The unique identifier of the Neptune Analytics graph.
string
[REQUIRED]
The query string to be executed.
string
[REQUIRED]
The query language the query is written in. Currently only openCypher is supported.
dict
The data parameters the query can use in JSON format. For example: {"name": "john", "age": 20}. (optional)
(string) --
(:ref:`document<document>`) --
string
Query plan cache is a feature that saves the query plan and reuses it on successive executions of the same query. This reduces query latency, and works for both READ and UPDATE queries. The plan cache is an LRU cache with a 5 minute TTL and a capacity of 1000.
string
The explain mode parameter returns a query explain instead of the actual query results. A query explain can be used to gather insights about the query execution such as planning decisions, time spent on each operator, solutions flowing etc.
integer
Specifies the query timeout duration, in milliseconds. (optional)
dict
Response Syntax
{ 'payload': StreamingBody() }
Response Structure
(dict) --
payload (:class:`.StreamingBody`) --
The query results.