Query existing berkeleydb database

19 views
Skip to first unread message

matthew...@tieto.com

unread,
May 4, 2016, 2:05:33 PM5/4/16
to Gremlin-users
Gremlin newbie question:

I have a titan dabatase using berkeleyje as back end. The database is generated by and used by a java-based application.

That's all fine, but I would like to be able to run arbitrary queries against the database, and from what I read, I understood Gremlin could do this.

So I have installed 'titan-1.00-hadoop1' separately from the application, and set up a simple config file in order to be able to run germlin against the db:

storage.backend=berkeleyje
storage.directory=/myapp/db

I seem to be able to connect OK

gremlin> g=TitanFactory.open('../conf/titan-berkeleyje.properties')
==>standardtitangraph[berkeleyje:/myapp/db]

But thereafter, whatever commands I run result in an error. For example:

gremlin> g.V.has('type','account').next()
No such property: V for class: com.thinkaurelius.titan.graphdb.database.StandardTitanGraph
Display stack trace? [yN]

Can somebody please point me in the right direction? Is there some detailed documentation for the Gremlin query syntax somewhere?

Thanks
Matthew


Daniel Kuppitz

unread,
May 4, 2016, 2:12:48 PM5/4/16
to gremli...@googlegroups.com
Minor issue. Queries require a traversal source, hence do:

graph = TitanFactory.open('../conf/titan-berkeleyje.properties')
g = graph.traversal()

Cheers,
Daniel


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/8f2184c1-d477-4c09-9689-a5b8a28d2199%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

matthew...@tieto.com

unread,
May 5, 2016, 4:25:58 AM5/5/16
to Gremlin-users
Thanks Daniel! Works a treat now.

Matthew
Reply all
Reply to author
Forward
0 new messages