OrientR - A simple REST API wrapper for R

162 views
Skip to first unread message

retrography

unread,
Jul 18, 2015, 4:56:05 AM7/18/15
to orient-...@googlegroups.com
Hi Everyone,

For those of you who use OrientDB and R together: I have written a tiny REST API wrapper that helps you run queries against OrientDB. It uses the jsonlite package to convert the JSON response into a R DataFrame, strips metadata fields returned along with the data, and converts RIDs and Dates into numbers and DateTime variables. This is the minimum I needed to get my project off the ground, but don't hesitate to fork/pull request if you need additional functionalities. 

Here is the github address: https://github.com/retrography/OrientR

Cheers,
Mahmood

Luca Olivari

unread,
Jul 18, 2015, 9:55:15 AM7/18/15
to orient-...@googlegroups.com
Hi Mahmood,

Thanks for taking the time to contribute to OrientDB! That's really appreciated... I've just tweeted a link to your github project. If you need help with your project send me a note.

Regards,
Luca

retrography

unread,
Jul 23, 2015, 6:49:24 PM7/23/15
to OrientDB, luca.o...@gmail.com
Hi Luca,

I have one question:

OrientDB returns a @fieldTypes field along with the response JSONs that contains information on the data types of different fields. I use that field for automatic format conversions when possible. 

I just want to know where I can find the list of data type codes that OrientDB uses.

I have found these by now:

"g": Lists/Sets/Collections
"x": RIDs
"t": Date/Time/DateTime
"z": Anything resulted from a traversal

Are these correct, and are there any others?

Btw, I am updating the package as it seems to work pretty well, and so it looks like it is worthy of the time I spend on it.

Cheers,
Mahmood

Luca Garulli

unread,
Jul 30, 2015, 3:56:04 AM7/30/15
to OrientDB, Luca Olivari
Hi Mahmood,
Thanks for your project, I'd like to include it in OrientDB drivers. 

About your question take a look at:




Best Regards,

Founder & CEO


--

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

retrography

unread,
Jul 30, 2015, 12:02:38 PM7/30/15
to OrientDB, luca.o...@gmail.com, l.ga...@orientdb.com
Thank you Luca(s)!

For now the driver only has a query interface (runQuery function), and I am testing it in my own project. It looks robust, no obvious bug. 

I will write a couple of pages of help for runQuery and will add an interface to execute commands (exeCommand function) soon. 

Please let me know if you include it in your driver list. If you do so, I may have to include some test units in the package so we make sure people don't get bad surprises.

Best,
Mahmood

Luca Garulli

unread,
Jul 30, 2015, 2:07:57 PM7/30/15
to retrography, OrientDB, Luca Olivari
Hi Mahmood,
I already included it ;-)

The best would be having:
  • A README.md file with the documentation about installing, usage and current limitations
  • Test cases, in your case would be only connect/disconnect/query, right?
  • A few cool examples


Best Regards,

Luca Garulli
Founder & CEO

Mahmood Shafeie Zargar

unread,
Jul 30, 2015, 3:21:44 PM7/30/15
to Luca Garulli, OrientDB, Luca Olivari
Hi Again,

Actually, there is no connect and disconnect. "getDB" simply helps the user create a connection string and then the user has to pass the connection string to each runQuery (that's how other drivers like RNeo4j have handled it as well).

On the other hand the getQuery function takes many arguments, that have to be tested to make sure they work smoothly with each other. That would be the main test.

The README.md file is already there. Will add a couple of examples for the sake of clarity. Also, R has this internal documentation/help system that everyone consults at dev time, and I will try to complete that today as well.

Cheers,
Mah

Luca Garulli

unread,
Jul 30, 2015, 4:16:39 PM7/30/15
to Mahmood Shafeie Zargar, OrientDB, Luca Olivari
Hi Mah,
Sounds good. Keep us posted on your updates.


Best Regards,

Luca Garulli
Founder & CEO


Reply all
Reply to author
Forward
0 new messages