couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <>
Subject Re: Bulk CSV import?
Date Fri, 15 Jan 2010 19:08:53 GMT
On Fri, Jan 15, 2010 at 12:45 AM, Brian Candler <> wrote:
> On Thu, Jan 14, 2010 at 02:15:54PM -0800, Chris Anderson wrote:
>> > More difficult would be to allow bulk *updates* via this mechanism, because
>> > having parsed out the IDs you'd need to be able to fetch existing docs,
>> > modify and write back.
>> >
>> If the CSV source was responsible for tracking _revs then it could work easily.
> What I mean is, couchdb itself can't parse out the _id and _rev as the
> stream comes in (since the CSV parsing isn't built into couchdb), so it
> can't pre-fetch the docs. The doc fetch requests would have to be bounced
> back to couchdb core. e.g.

I was thinking of an API where the function just transforms CSV to
JSON, not where it also compares it to existing documents.

You're right it gets complex as a real bulk update function. Maybe
this is better addressed with a 3rd party script.


Chris Anderson

View raw message