Skip to content

DataStax Gremlin Server Connection #189

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

Closed
gourav-sg opened this issue Sep 3, 2021 · 6 comments
Closed

DataStax Gremlin Server Connection #189

gourav-sg opened this issue Sep 3, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@gourav-sg
Copy link

Describe the bug
:remote config alias g gourav.g does not work

To Reproduce
Steps to reproduce the behavior:

  1. created a connection to datastax using:
%%graph_notebook_config
{
    "host": "localhost",
    "port": 8182,
    "username" : "cassandra",
    "password" : "cassandra",
    "auth_mode": "DEFAULT",
    "ssl": false,
    "database" : "dag"
}
  1. Was able to run commands like system.list(), which showed the different graph databases (keyspaces in Cassandra)
  2. Was not able to run Gremlin commands like :remote for generating alias for g
  3. 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

@gourav-sg gourav-sg added the bug Something isn't working label Sep 3, 2021
@krlawrence
Copy link
Contributor

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?

@gourav-sg
Copy link
Author

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

@joywa joywa changed the title cannot create alias DataStax Gremlin Server Connection Jan 19, 2023
@joywa joywa added enhancement New feature or request and removed bug Something isn't working labels Jan 19, 2023
@michaelnchin
Copy link
Member

Related issues: #206, #324

@michaelnchin
Copy link
Member

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"
  },
  ...
}

@michaelnchin
Copy link
Member

Closing, as the requested features have been implemented. Please feel free to re-open if you have any additional questions or concerns.

@gourav-sg
Copy link
Author

gourav-sg commented Feb 3, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Resolved
Development

No branches or pull requests

4 participants