Few functions not working in Gremlin

354 views
Skip to first unread message

Siva Punnaivanam

unread,
Nov 1, 2018, 6:31:52 AM11/1/18
to Gremlin-users
Hi Team, 

I have started TinkerPop console and using the modern graph I am able to test the functions like .map, .transform, .contains and .matches etc. 
Please note that, I have created the modern graph in tinkerpop console using below commands.
graph = TinkerFactory.createModern()
g = graph.traversal()

But I have a Gremlin  database created in Azure environment. If I connect to that database through tinkerpop console, above functions are not working. 
I am getting below error message. What could be the issue?

gremlin> g.V('8cc7ca46-53a7-4a57-a401-37aaec871afe').values('createdDate').map{new Date(it.get()).format('yyyy-MM-dd')}
ActivityId : a9c72210-c159-476e-bd28-c8b10eb5396d
ExceptionType : GraphSyntaxException
ExceptionMessage :
        Gremlin Query Syntax Error: Script compile error: Unsupported groovy language rule: 'closure' text: '{newDate(it.get()).format('yyyy-MM-dd')}' @ line 1, column 70.
        1 Error(s)
Source : Microsoft.Azure.Graphs
        GremlinRequestId : a9c72210-c159-476e-bd28-c8b10eb5396d
        Context : graphcompute
        Scope : graphparse-translate-outer
        GraphInterOpStatusCode : QuerySyntaxError
        HResult : 0x80131500
Type ':help' or ':h' for help.
Display stack trace? [yN]


Stephen Mallette

unread,
Nov 1, 2018, 7:54:18 AM11/1/18
to gremli...@googlegroups.com
I assume you're talking about CosmosDB when you say a "Gremlin Database created in an Azure environment"? if so, CosmosDB does not support lambdas so your call to map{} won't work. Also note that CosmosDB does not yet support all Gremlin steps just yet:


--
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/1caa9fef-f6b4-4ba3-8d5c-8d86a7675822%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages