Similar equivalent to mongoimport

Jeremiah Peschka jeremiah.peschka at
Tue Apr 24 15:49:02 EDT 2012

Responses inline.
Jeremiah Peschka - Managing Director, Brent Ozar PLF, LLC
Microsoft SQL Server MVP

On Apr 24, 2012, at 12:37 PM, yatr_98 at wrote:

> Hello,
> I am just starting out with Riak and am switching over from MongoDB. I have many GB of data in either JSON or XML and was wondering if there is a way to import this in a bulk manner to Riuk. For MongoDB, I put each json file in one text file with each json document on one line and use mongoimport to upload to a collection. Is there an equivalent thing to mongoimport in Riuk? If not, how can I get this data in. Also, is it ok to interact with Riuk using Ruby as I do not know Erlang?

There's no direct equivalent that I know of, but you can check out the Riak Function Contrib where you'll find this easily modified Ruby program to import YAML  Pay no attention to the terrible code style, I am not a professional Ruby developer.

Obviously, you can interact with Riak using Ruby. There are a number of community developed clients as well as officially supported clients so you can use your language of choice.

> Lastly, am I right to assume that a bucket is similar to a collection in mongodb and the key/objects are the documents?

A bucket is a logical namespace within Riak. There's no physical separation like you might see in the tables of an RDBMS. Not knowing how MongoDB stores data on disk, I can't speak to a collection.

A key is the identifier for an object, just like the key in MongoDB is the identifier for the document. 

The value is an arbitrary binary pile of data - it can be anything you want. If you're storing a JSON or XML document, you'll want to make sure you set the content type appropriately before you store it in Riak. 
> Thanks very much for the help.
> Mark
> _______________________________________________
> riak-users mailing list
> riak-users at

More information about the riak-users mailing list