You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to connect to a Neptune database using Cypher for queries (and use multiple labels in queries which requires the TranslatorFeature.MULTIPLE_LABELS).
I do get this to work using the following code:
// cluster setup
// .. this is identical in both cases
// client setup
CypherGremlinClient client = CypherGremlinClient.translating(
cluster.connect(),
() -> Translator.builder()
.gremlinGroovy()
.inlineParameters()
.enableMultipleLabels()
.build(TranslatorFlavor.neptune())
);
However - as soon as I start using sessions and a GremlinServerDriver I can't seem to get it work. I run into an exception:
org.opencypher.gremlin.translation.exception.SyntaxException: Multiple labels are not supported
// cluster setup
// .. this is identical in both cases
// driver setup
Config config = Config.build()
.withTranslation(TranslatorFlavor.neptune())
.ignoreIds()
.toConfig();
GremlinServerDriver driver = GremlinDatabase.driver(cluster, config);
I have tried quite a few ways to get this to work but it seems the referenced code line (which creates the CypherGremlinClient in the GremlinServerDriver.session() method) only allows using a TranslatorFlavor.
I would kindly ask if you could enable users to create a Config with a Supplier<Translator<String, GroovyPredicate>> translatorSupplier which could then be used upon creating of a session to produce a different translating CypherGremlinClient.
Unless I am mistaken there is no way to create sessions with such a translatorSupplier - if I am wrong I'd kindly ask for a nudge in the right direction.
I could also create a PR myself if you'd like.
Thank you!
The text was updated successfully, but these errors were encountered:
I would like to connect to a Neptune database using Cypher for queries (and use multiple labels in queries which requires the
TranslatorFeature.MULTIPLE_LABELS
).I do get this to work using the following code:
However - as soon as I start using sessions and a
GremlinServerDriver
I can't seem to get it work. I run into an exception:I have tried quite a few ways to get this to work but it seems the referenced code line (which creates the
CypherGremlinClient
in theGremlinServerDriver.session()
method) only allows using aTranslatorFlavor
.cypher-for-gremlin/tinkerpop/cypher-gremlin-neo4j-driver/src/main/java/org/opencypher/gremlin/neo4j/driver/GremlinServerDriver.java
Line 45 in ee77607
I would kindly ask if you could enable users to create a
Config
with aSupplier<Translator<String, GroovyPredicate>> translatorSupplier
which could then be used upon creating of a session to produce a different translatingCypherGremlinClient
.Unless I am mistaken there is no way to create sessions with such a translatorSupplier - if I am wrong I'd kindly ask for a nudge in the right direction.
I could also create a PR myself if you'd like.
Thank you!
The text was updated successfully, but these errors were encountered: