Creating the database

201 views
Skip to first unread message

Rohit Jain

unread,
Aug 10, 2017, 6:17:36 PM8/10/17
to JanusGraph users list
Hi folks,

I am new to JanusGraph.  When I look at the tutorials it is all about the query language - how to query and traverse the graph.  I can find very little on how to create vertices, edges, their properties, labels, and what-not.  An extensive example that covers it all.  There is one section in the docs -- Schema and Data Modeling -- that hardly does this justice, as compared to the extensive Graph of the Gods example.  It would be great if it actually showed how to build the Graph of the Gods first, and maybe even how to load it, before showing how to query it.  So, maybe I am a SQL guy and think differently, but you first show how to create tables, insert, delete, update data, and then how to start querying it.  Here it seems backwards.  Any examples I have seen, when I apply I get errors that I cannot understand, when what I am doing looks exactly like it is in the documentation or some tutorial I found on the web on Titan.  It would be great if I could see a Gremlin based example that actually shows the creation and building of the Graph of the Gods graph (or equivalent), so I can get started with this.  Maybe I am just not getting it.  But perhaps someone can either help or point me to some adequate help.

Thanks!
Rohit

Rohit Jain

unread,
Aug 10, 2017, 11:59:36 PM8/10/17
to JanusGraph users list
Actually, after a bit more of searching, I was able to find the answer to my question.  Not in documentation form.  But will do.  It is the creation of the schema for the Graphs of the Gods example -- exactly what I was looking for, although not in Gremlin commands but Java.

Rohit

Robert Dale

unread,
Aug 11, 2017, 1:21:23 AM8/11/17
to Rohit Jain, JanusGraph users list
The next chapter, Gremlin Query Language - http://docs.janusgraph.org/latest/gremlin.html - is probably what you are looking for.  Then there's the reference documentation for Gremlin at http://tinkerpop.apache.org/docs/current/reference/

Robert Dale

--
You received this message because you are subscribed to the Google Groups "JanusGraph users list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rohit Jain

unread,
Aug 11, 2017, 8:29:46 AM8/11/17
to Robert Dale, JanusGraph users list
Robert,

Yes, I looked at those but those did not help clarify it as well as looking at the code that creates the Graph of the Gods schema did. I think it will be very useful to add the code from the program that creates that database, and move that into the tutorial in Getting Started.  It could be in the Gremlin Query Language, or more appropriately the Schema and Data Modeling chapter.  My preference is that the Get Started mentions that the creation of the schema is covered there. That would really round it up. 

And what would help with the tutorial is if there was a cheat sheet that covered the difference say between what out does vs. outE for example.  A graphic representation of what these operators do or cover would be awesome. 

Maybe I am asking for a lot :-(. But that would have helped save a lot of time for me and had me productive a lot faster and less frustrated. Mind you, I am very familiar with this challenge. I am the CTO for Apache Trafodion / EsgynDB - the best HTAP SQL relational database for transactions through analytics on Hadoop (HBase, Hive, Apache ORC, Apache Avro, Parquet), and usability is always a challenge to address given all the other cool things we need to do that customers need.  I am trying to provide a integrated solution for our customers between our product and JanusGraph, to extended our capabilities to extensive graph traversal, blended with SQL access, using our powerful Table Mapping User Defined Functions interface. 

Thanks!

Rohit

Robert Dale

unread,
Aug 11, 2017, 6:43:00 PM8/11/17
to Rohit Jain, JanusGraph users list

Rohit Jain

unread,
Aug 12, 2017, 5:01:46 PM8/12/17
to JanusGraph users list
Actually, I still prefer what I suggested -- that the code example of Graph of the Gods be used to illustrate the complete example beginning to end.

I already reviewed the page you referred to and find it confusing.  The problem is that nowhere is the syntax for anything discussed.  There are just a bunch of examples.  I then see a _ somewhere, or a .it or a .source or a loop, or both or addE or addEdge, or ....  They just appear without any explanation.  In SQL I am used to a Reference Manual that shows you the syntax for everything the language supports.  It explains every option.  Then is shows how to use that syntax with examples.  On the top of that you have a User's Guide.  I have not been able to find any manual on Gremlin that covers the syntax, options, and then examples in that way.  I find it completely mind-boggling.  Maybe I am just old fashioned and people learn very differently.

Also, it is ass backwards from my perspective.  It starts talking about the query language before even talking about how the data got there in the first place. How were the vertices and edges created. 

Anyway, I am getting the hang of it now - enough to get dangerous, or be able to use enough to illustrate to the real coders how to go implement what my intended end result is.

Thanks for all your help!
Rohit

kevi...@gmail.com

unread,
Mar 22, 2018, 11:53:38 AM3/22/18
to JanusGraph users
Hi Rohit, I am also new to Graph database, and I have the same feeling like you do, Janusgraph doc is having too limited details about the operations (creation, loading, editing, deleting database)

Kevin

Misha Brukman

unread,
Mar 22, 2018, 12:12:29 PM3/22/18
to kevi...@gmail.com, JanusGraph users

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.

kevi...@gmail.com

unread,
Apr 25, 2018, 10:46:38 PM4/25/18
to JanusGraph users
Thanks so much Misha, this material do mention a lot aspects that I've longed for.


On Friday, 23 March 2018 03:12:29 UTC+11, Misha Brukman wrote:
On Thu, Mar 22, 2018 at 1:36 AM, <kevi...@gmail.com> wrote:
Hi Rohit, I am also new to Graph database, and I have the same feeling like you do, Janusgraph doc is having too limited details about the operations (creation, loading, editing, deleting database)

Kevin

On Sunday, 13 August 2017 07:01:46 UTC+10, Rohit Jain wrote:
Actually, I still prefer what I suggested -- that the code example of Graph of the Gods be used to illustrate the complete example beginning to end.

I already reviewed the page you referred to and find it confusing.  The problem is that nowhere is the syntax for anything discussed.  There are just a bunch of examples.  I then see a _ somewhere, or a .it or a .source or a loop, or both or addE or addEdge, or ....  They just appear without any explanation.  In SQL I am used to a Reference Manual that shows you the syntax for everything the language supports.  It explains every option.  Then is shows how to use that syntax with examples.  On the top of that you have a User's Guide.  I have not been able to find any manual on Gremlin that covers the syntax, options, and then examples in that way.  I find it completely mind-boggling.  Maybe I am just old fashioned and people learn very differently.

Also, it is ass backwards from my perspective.  It starts talking about the query language before even talking about how the data got there in the first place. How were the vertices and edges created. 

Anyway, I am getting the hang of it now - enough to get dangerous, or be able to use enough to illustrate to the real coders how to go implement what my intended end result is.

Thanks for all your help!
Rohit

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.

shapeshifter

unread,
May 2, 2018, 9:46:17 AM5/2/18
to JanusGraph users
I totally agree with this, and some of what the OP said too.

While it's not a perfect analogue, any book on (my/ms)sql (or similar) would have entire chapters early on about creating and connecting to databases (graphs).  All the info I find on graph databases is either about traversals, connecting to DBs/indexers, or very low-level stuff for advanced users.  I've spent more time on this than I care to admit (PAID WORK time, not spare time) and most of that time is going around in circles.

It's almost like everyone has their server of choice (janus or whatever) set up using whichever single graph the server is set up with.  I have managed to create a new graph via the console, and have altered the config to get a traversal source from it on startup, but this is hardly dynamic. I want to be able to created named, empty graphs on demand, and select them arbitrarily, both in and outside the console.

While Kelvin's online book is excellent, he also confuses me by showing how to open a graph in Janus, but not showing anything about naming or persistence (how would I get access this new graph in the future? How do I get back to the air-routes graph again that was also opened, populated, but seemingly unnamed? That was assigned to graph too). ConfiguredGraphFactory appears to be the only way to do this(?)

Mind blown.

I note the link to the graph of the gods setup source code. This could be useful, but I'm using gremlin.net which doesn't seem to have Factory classes and only lets me connect to existing traversal sources (which I have to create manually on the console etc etc). I'm wondering if I'd be better off running the server as a REST API if I could use it for open/create commands as well as traversals.

I'd like to end on a positive note, so I'll say that in fairness, once I have connected to a graph, I have no issues with traversals, and there seems plenty of info on these.
Reply all
Reply to author
Forward
0 new messages