Accessing Datastax enterprise graph from gremlin console.

163 views
Skip to first unread message

satyajit mohapatra

unread,
Nov 23, 2016, 10:44:39 AM11/23/16
to Gremlin-users
can anyone help in accessing dse graph from gremlin console.
I can create graph using system.graph("demo").create()
how to traverse the graph without creating alias using :remote. How to get graph and g object to use in gremlin query?

I don't want remote as i have use google golang to execute gremlin query (there are no golang drivers for DSE graph).

thank you,
Satya

Stephen Mallette

unread,
Nov 23, 2016, 10:49:49 AM11/23/16
to Gremlin-users
I'm confused by your question. It starts by asking about the Gremlin Console, but then drifts into a question about how to connect with Go. Can you please better clarify what you're asking here?

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/9c07a18a-8f05-4baf-b4c1-11b0d51d23e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gaurav Vishnoi

unread,
Nov 23, 2016, 2:09:21 PM11/23/16
to Gremlin-users
This is solved. I needed to pass the correct rebinding.

package main

import (
"fmt"
"github.com/qasaur/gremgo"
)

func main() {
dialer := gremgo.NewDialer("127.0.0.1:8182") // Returns a WebSocket dialer to connect to Gremlin Server
g, err := gremgo.Dial(dialer) // Returns a gremgo client to interact with
if err != nil {
fmt.Println(err)
return
}
res, err := g.Execute(
"g.V().count()",
map[string]string{"x": "1234"}, map[string]string{"g":"test.g"})

if err != nil {
fmt.Println(err)
return
}
fmt.Println(res)
}


Gaurav Vishnoi

unread,
Nov 23, 2016, 2:09:21 PM11/23/16
to Gremlin-users
I have similar issue.

We implemented Graph database using Titan and gremgo (GOLANG) which runs tinkerpop queries on gremlin server. It works like a charm.
When we switched to DSE instead of Titan, queries are failing because graph initialization and getting hold of graph traversal object is different in DSE.  

We cant seem to find a way to initialize DSE graph with gremlin and  instantiate "g" which is graph traversal using tinkerpop. 
There are plenty of examples how to do this using DataStax drivers like Java, but we are not using any Datastax provided driver.



On Wednesday, November 23, 2016 at 10:49:49 AM UTC-5, Stephen Mallette wrote:
I'm confused by your question. It starts by asking about the Gremlin Console, but then drifts into a question about how to connect with Go. Can you please better clarify what you're asking here?
On Wed, Nov 23, 2016 at 10:41 AM, satyajit mohapatra <your...@gmail.com> wrote:
can anyone help in accessing dse graph from gremlin console.
I can create graph using system.graph("demo").create()
how to traverse the graph without creating alias using :remote. How to get graph and g object to use in gremlin query?

I don't want remote as i have use google golang to execute gremlin query (there are no golang drivers for DSE graph).

thank you,
Satya

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages