Chris McKee
Chris McKee

Reputation: 4387

What is the simplest way to export CouchDB information to CSV?

What would be the simplest way to export a CouchDB database of documents (identical structure) to CSV?

I'm guessing it would involve writing a view and manually parsing each document serially using something like PHP, C# or Python.

But is there a simpler way or something already existing I can make use of?

Upvotes: 6

Views: 13032

Answers (2)

Salvador Aceves
Salvador Aceves

Reputation: 348

I made this : https://gist.github.com/3026004 , it takes the first 100 documents as sample for headers, and it supports nested hashes and arrays.

Upvotes: 2

Matt Goodall
Matt Goodall

Reputation: 1682

You should be able to generate the CSV directly from CouchDB, i.e. without PHP/C#/Python, using a list function. See http://wiki.apache.org/couchdb/Formatting_with_Show_and_List and http://guide.couchdb.org/editions/1/en/transforming.html for more information.

Upvotes: 8

Related Questions