-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in Translation #294
Comments
Hello @rifuller, thank you, we are happy to know that Cypher for Gremlin is useful for your team. Because native Gremlin has no predicate for Regex match, This is actually a shortcoming that error about Maybe for your requirement could be addressed with text predicates (
Please notify me if it works in your case, I might be missing something. By the way, to adapt query to other Cosmos DB specifics, it is recommended to use val input =
"MATCH (m:Machine)-[e:Has {storeName: \"CA\"}]->(c:Certificate) \nWHERE m.name =~ \"*.domain\"\nRETURN m.name,e.storeName,c.name,c.thumbprint"
val ast = CypherAst.parse(input)
val translator = Translator.builder.gremlinGroovy.build(TranslatorFlavor.cosmosDb)
println(ast.buildTranslation(translator)) Please let me know if you have any other questions, or close this issue. |
Signed-off-by: Dwitry dwitry@users.noreply.github.com
Signed-off-by: Dwitry dwitry@users.noreply.github.com
Signed-off-by: Dwitry dwitry@users.noreply.github.com
There are only a couple of pieces of that translated query at least that are custom predicates: The final query:
I'll update my tool with those tweaks, and set it to use the CosmosDB flavor. I really appreciate your prompt response. |
Thank you for mentioning that Edit: by additional tweaks I've meant workarounds. It is still recommended to use the CosmosDB flavor. |
@rifuller, closing issue after a week of inactivity. Don't hesitate to open a new issue if you have any more questions. |
First of all - thank you for such a useful library. My team is more familiar with Cypher but I've built my project using a CosmosDB backend and this allows them to use their existing knowledge.
So, I have a simple application for converting a CYPHER query to Gremlin.
this outputs:
When I run that query on CosmosDB I get this error:
Gremlin Query Compilation Error: Unable to resolve symbol 'cypherRegex' in the current context
Is this a bug or unsupported?
The text was updated successfully, but these errors were encountered: