CouchDB "Seed"

157 views
Skip to first unread message

Henrique Gogó

unread,
Jul 4, 2011, 10:55:00 AM7/4/11
to couc...@googlegroups.com
Hey people..

I'm searching somthing that I can use to populate my database.
I have some default data that I want to insert on database when configure a new developer machine.

I want something like "rake db:seed" of Ruby

Sebastian Cohnen

unread,
Jul 4, 2011, 11:08:28 AM7/4/11
to couc...@googlegroups.com
Hi Henrique,

I started couchpopulator [1] a while ago but haven't done much with it yet. But maybe it's still useful for your purpose.

Best

Sebastian

[1] https://github.com/tisba/couchpopulator

> --
> You received this message because you are subscribed to the Google Groups "CouchApp" group.
> To post to this group, send email to couc...@googlegroups.com.
> To unsubscribe from this group, send email to couchapp+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/couchapp?hl=en.

Henrique Gogó

unread,
Jul 4, 2011, 11:38:14 AM7/4/11
to couc...@googlegroups.com
Thanks for your suggestion.
I'm thinking something more simple.

I think i'll use a shell script with curl commands to populate... more easy :)

2011/7/4 Sebastian Cohnen <sebasti...@googlemail.com>

Dave Cottlehuber

unread,
Jul 5, 2011, 1:16:09 AM7/5/11
to couc...@googlegroups.com
2011/7/5 Henrique Gogó <henriq...@gmail.com>:

Three other options;

use couchapp and put stuff in the _docs folder. On push it will upload them.

Set up the .couch file the way you want it, and just copy that in its
compacted, purged entirety to the dev machine. It will automatically
be made available as a couch DB again.

Have a master DB on your intranet and simply issue a single curl to
trigger one-time replication to the dev box (localhost) remembering to
use admin creds if you want to replicate ddocs as well.

A+
Dave

Ben Atkin

unread,
Jul 5, 2011, 1:45:18 AM7/5/11
to couc...@googlegroups.com

I really like the replication idea. Thank you, Dave.

Marcello Nuccio

unread,
Jul 5, 2011, 2:00:58 AM7/5/11
to CouchApp
On 5 Lug, 07:16, Dave Cottlehuber <d...@muse.net.nz> wrote:
> Three other options;
>
> use couchapp and put stuff in the _docs folder. On push it will upload them.

Please note that documents from the `_docs` folder will override
existing documents each time you do `couchapp push`. So, any update to
those documents is lost at each push.

Marcello

Henrique Gogó

unread,
Jul 5, 2011, 6:59:53 AM7/5/11
to couc...@googlegroups.com
Thank you VERY MUCH!

2011/7/5 Dave Cottlehuber <da...@muse.net.nz>

M E

unread,
Jul 4, 2011, 11:12:41 AM7/4/11
to couc...@googlegroups.com
Hi Henrique,

2011/7/4 Henrique Gogó <henriq...@gmail.com>

Hey people..

I'm searching somthing that I can use to populate my database.
Where is your original source data stored (database, files ...)? What is the volume of data that you would want to handle?
I have some default data that I want to insert on database when configure a new developer machine.
When you have your dataset in one couchdb you can easily push it so some other machine using replication.

I want something like "rake db:seed" of Ruby
I have started to develop a couchapp allowing to populate couchdb with data from flat files, a basic alpha version should be ready soon. Just tell me if you think you might need it.

Cheers,

alef

P.S. : you might want to use couchdb users mailing list for such questions: us...@couchdb.apache.org

Michael Bykov

unread,
Jul 4, 2011, 10:59:08 AM7/4/11
to couc...@googlegroups.com
2011/7/4 Henrique Gogó <henriq...@gmail.com>:

> Hey people..
> I'm searching somthing that I can use to populate my database.
> I have some default data that I want to insert on database when configure a
> new developer machine.
> I want something like "rake db:seed" of Ruby
> Any idea?


Hi Henrique,

Small standalone CouchRest app somewhere around? Just for seeding DB.


--
М.

http://diglossa.ru
xmpp://m.b...@jabber.ru

Henrique Gogó

unread,
Jul 16, 2011, 12:42:51 PM7/16/11
to couc...@googlegroups.com
So, I tried use _docs folder, but for each doc, couchapp add a "couchapp attribute" with empty object... I dont like this.
I just created a simple shell script file with curl commands inserting my "seed docs"... simple, and works! :)

Thanks for all!

2011/7/4 Michael Bykov <m.b...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "CouchApp" group.
To post to this group, send email to couc...@googlegroups.com.
To unsubscribe from this group, send email to couchapp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/couchapp?hl=en.

Max Ogden

unread,
Jul 28, 2011, 11:26:09 AM7/28/11
to couc...@googlegroups.com
you can use recline to import JSON apis or copy/paste bulk data into Couch: https://github.com/maxogden/recline

example: http://max.couchone.com/senators/_design/recline/_rewrite use the Import menu to play around

caolan

unread,
Aug 5, 2011, 12:30:52 PM8/5/11
to couc...@googlegroups.com
The latest Kanso code (dev branch) has some really useful tools for pushing large sets of documents to a database. Including support for performing transformations on the docs, adding uuids from couch and converting data from CSV. Its all using streaming parsers so should be able to handle huge data sets.

See: http://kansojs.org/guides/working_with_data.html (with more tools available in the dev branch on github)

Goog Jobs

unread,
Mar 1, 2012, 6:03:27 AM3/1/12
to couc...@googlegroups.com
Hi,Henrique! is there a place i can download a couchdn dataset ?

在 2011年7月4日星期一UTC+8下午10时55分00秒,Henrique Gogó写道:
在 2011年7月4日星期一UTC+8下午10时55分00秒,Henrique Gogó写道:
Reply all
Reply to author
Forward
0 new messages