Gremlin evaluationTimeoutBehavior query hint - Amazon Neptune
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

Gremlin evaluationTimeoutBehavior query hint

By default, when a Gremlin query exceeds the query timeout, Neptune cancels the query and returns an error. The evaluationTimeoutBehavior query hint changes this behavior so that Neptune streams back any partial results that were computed before the timeout occurred, instead of returning an error.

Note

This query hint uses the with step, not withSideEffect, and does not use the Neptune# prefix.

Syntax

g.with('evaluationTimeoutBehavior', 'value').gremlin-traversal
Available Values
  • partialResults – When the query times out, Neptune returns any results that were computed before the timeout.

  • exception – When the query times out, Neptune returns an error. This is the default behavior.

Important

This query hint can only be used with read-only queries. If you use this hint with a mutating query or with DFE enabled (either via the useDFE query hint or the neptune_dfe_query_engine instance parameter), Neptune returns an error.

Example

The following query returns partial results if it exceeds the query timeout:

g.with('evaluationTimeoutBehavior', 'partialResults').V().out().valueMap()