graph-notebook
graph-notebook copied to clipboard
cannot create alias
Describe the bug :remote config alias g gourav.g does not work
To Reproduce Steps to reproduce the behavior:
- created a connection to datastax using:
%%graph_notebook_config
{
"host": "localhost",
"port": 8182,
"username" : "cassandra",
"password" : "cassandra",
"auth_mode": "DEFAULT",
"ssl": false,
"database" : "dag"
}
- Was able to run commands like
system.list()
, which showed the different graph databases (keyspaces in Cassandra) - Was not able to run Gremlin commands like
:remote
for generating alias for g - Error reported:
{'error': GremlinServerError('597: startup failed:\nScript89274.groovy: 2: unexpected token: : @ line 2, column 1.\n :remote config alias g gourav.g\n ^\n\n1 error\n')}
Expected behavior should have documentation of method demonstrated to show how to create an alias g.
When I am using gremlin console in command line and connecting to Datastax cassandra everything works fine as I am able to create the remote connection properly
Screenshots NA
Desktop (please complete the following information):
- OS: Ubuntu
- Browser chrome
- Version latest
Additional context Not applicable
Hi @gourav-sg and thanks for taking the time to open an issue.
The :remote
command is unique to the Gremlin console and the command itself is not sent to the server in that form. We're happy to consider this more as a feature request but can you please say a bit more about your use case for using an alias in the notebooks. Is it to have multiple graph traversal source objects each pointing to a different backend graph/keyspace?
Hi @krlawrence , thanks a ton for your kind response.
For connecting with Datastax gremlin server this is the code that I am using in the notebook:
%%gremlin
import org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection;
g = traversal().withRemote(DriverRemoteConnection.using('0.0.0.0', 8182, "database_name_oe_keyspace_name"))
g.V().outE().inV().path()
But the value of g has to be set in each and every cell of the notebook. Also is there a way that I could enter username and passwords while connecting?
Thanks and Regards, Gourav Sengupta
Related issues: #206, #324
Hi @gourav-sg, thank you again for submitting this enhancement request!
These requests have implemented in #221 and #356. As of graph-notebook
version 3.7.0, users can now specify a custom traversal source and username/password to use for %%gremlin
queries.
These fields are configured via the new gremlin
section in %%graph_notebook_config
, which will look something like:
%%graph_notebook_config
{
...
"gremlin": {
"traversal_source": "g",
"username": "user",
"password": "pass",
"message_serializer": "graphsonv3"
},
...
}
Closing, as the requested features have been implemented. Please feel free to re-open if you have any additional questions or concerns.
Dear Michael,
Thank you so very much.
I am still in process of testing this and will surely reach out to you to seek guidance.
Thanks, Gourav
On Fri, 3 Feb 2023, 01:13 Michael Chin, @.***> wrote:
Closed #189 https://github.com/aws/graph-notebook/issues/189 as completed.
— Reply to this email directly, view it on GitHub https://github.com/aws/graph-notebook/issues/189#event-8426970580, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJZLQYSPSVF2B3PCIRYAPLWVRLSHANCNFSM5DLJRCFA . You are receiving this because you were mentioned.Message ID: @.***>