Gremlin step coverage in DFE
Gremlin DFE can be used by either enabling the instance parameter or
using the Neptune#useDFE query hint. For more information please refer to
Using Gremlin with the Neptune DFE query engine.
The following sections describe DFE step coverage for Neptune engine release 1.5.0.0 and later, and for Neptune engine releases before 1.5.0.0.
Neptune engine release 1.5.0.0 and later
Starting with Amazon Neptune engine release 1.5.0.0, DFE natively supports most Gremlin steps. The following steps are not natively supported on DFE:
-
Mutation –
addV(),addE(),drop(),mergeV(),mergeE(), andproperty(). -
Filters and predicates –
all(),any(),none(),TextP.regex, andTextP.notRegex. -
Side-effects –
barrier(),subgraph(),timeLimit(), andtree(). -
Map –
asBool(),asNumber(),element(),format(),math(),merge(), andpropertyMap().
If you use one of these steps, Neptune falls back to TinkerPop processing for that part of the query.
See also Gremlin standards compliance for Neptune-wide differences from Apache TinkerPop that also apply under DFE.
A Gremlin query can contain a set of entirely supported steps and still include step patterns that do not translate fully to DFE. If you use a step in a more complex or less common form, that part of the query falls back to TinkerPop for processing. To check whether a specific query runs natively in DFE, use the explain or profile output.
Neptune engine releases before 1.5.0.0
The following steps are available to use in Gremlin DFE.
Path and traversal steps:
asDate()
Aggregate and collection steps:
aggregate(global)
Mathematical steps:
Element steps:
otherV()
Property steps:
properties()
Filter steps:
and()
String manipulation steps:
concat()
Predicates:
Limitations
Repeat with Limit, Labels inside repeat traversal and dedup are not supported in DFE yet.
// With Limit inside the repeat traversal g.V().has('code','AGR').repeat(out().limit(5)).until(has('code','FRA')) // With Labels inside the repeat traversal g.V().has('code','AGR').repeat(out().as('a')).until(has('code','FRA')) // With Dedup inside the repeat traversal g.V().has('code','AGR').repeat(out().dedup()).until(has('code','FRA'))
Path with nested repeats, or branching steps are not supported yet.
// Path with branching steps g.V().has('code','AGR').union(identity, outE().inV()).path().by('code') // With nested repeat g.V().has('code','AGR').repeat(out().union(identity(), out())).path().by('code')