AWS Neptune: Using 'withStrategies' from a remote console

180 views
Skip to first unread message

Daniel C. Weber

unread,
May 6, 2021, 6:18:31 AM5/6/21
to Gremlin-users
There's no indication that AWS Neptune's implementation of the Gremlin API won't support 'withStrategies' at all, however, it doesn't work for me from a remote console, e.g.

g.withStrategies(SubgraphStrategy.build().vertexProperties(hasNot('p')).create())

yields

{"detailedMessage":"Failed to interpret Gremlin query: Query parsing failed at line 1, character position at 7, error message : token recognition error at: 'tra'","code":"MalformedQueryException","requestId":"---"}

Same for "g.withStrategies(ReadOnlyStrategy.instance())" and "g.withStrategies()".

I assume it's due to a limitation of the Groovy serializer in Neptune, since there's examples around the web that clearly show Neptune's support for withStrategies when used directly in Java. Can anybody confirm?

Cheers
Daniel

Stephen Mallette

unread,
May 6, 2021, 7:53:49 AM5/6/21
to gremli...@googlegroups.com
You're using the Java syntax in the Console which won't work on Neptune. Have you tried the Groovy syntax:


--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/6da29787-74f9-4a38-85e3-7a4ee32b3aadn%40googlegroups.com.

Daniel C. Weber

unread,
May 6, 2021, 8:56:52 AM5/6/21
to Gremlin-users
>>Have you tried the Groovy syntax:

Unfortunately, it doesn't work either:

>g.withStrategies(ReadOnlyStrategy)

{"detailedMessage":"Failed to interpret Gremlin query: Query parsing failed at line 1, character position at 7, error message : token recognition error at: 'tra'","code":"MalformedQueryException","requestId":"---"}

It already fails for no strategies at all (g.withStrategies())

Stephen Mallette

unread,
May 6, 2021, 9:02:17 AM5/6/21
to gremli...@googlegroups.com
hmm - sorry - i may have gotten ahead of myself. that feature came in 3.4.9 and Neptune still recommends 3.4.8. the support should arrive soon though. 

Daniel C. Weber

unread,
May 6, 2021, 10:29:46 AM5/6/21
to Gremlin-users
Alright, thanks a lot!
Reply all
Reply to author
Forward
0 new messages