Using gremlin g.V().coin(0.5) against CosmosDB throws an error. Is there another way to randomly filter out a traverser?
ExceptionType : GraphCompileException ExceptionMessage : Gremlin Query Compilation Error: Unable to bind to method 'coin', with arguments of type: (Decimal) 1 Error(s) Source : Microsoft.Azure.Graphs Context : graphcompute Scope : graphparse-translate-csharpexpressionbinding GraphStatusCode : ScriptEvaluationError HResult : 0x80131500
According to your description, I checked the Gremlin steps supported by Azure Cosmos DB and found that the Coin Step is not listed. Then, I checked the whole reference on Gremlin about Coin Step:
To randomly filter out a traverser, use the coin()-step (filter). The provided double argument biases the "coin toss."
From the error response you provided mentioned as follows:
ExceptionType : GraphCompileException ExceptionMessage : Gremlin Query Compilation Error: Unable to bind to method 'coin', with arguments of type: (Decimal) 1 Error(s) Source : Microsoft.Azure.Graphs Context : graphcompute Scope : graphparse-translate-csharpexpressionbinding GraphStatusCode : ScriptEvaluationError HResult : 0x80131500
I just tried to execute the following Gremlin query on Azure Portal and found it could work.
g.V().coin(0.5d)
User contributions licensed under CC BY-SA 3.0