couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Metson <si...@cloudant.com>
Subject Re: import csv data into couchdb document using python-cloudant module
Date Wed, 02 Apr 2014 14:22:29 GMT
An example is a doc that contained metadata about an image and had the image itself as an attachment.



On Wednesday, 2 April 2014 at 15:11, Ramanadham, Radhika wrote:

> Have a single doc with list of rows.
>  
> Also, if I may ask, what is the use of attaching the files in a doc? When do people want
to attach a file to a document?
>  
> -----Original Message-----
> From: Simon Metson [mailto:simon@cloudant.com]  
> Sent: Wednesday, April 02, 2014 2:15 AM
> To: user@couchdb.apache.org (mailto:user@couchdb.apache.org)
> Subject: Re: import csv data into couchdb document using python-cloudant module
>  
> Do you just want to attach the csv to a single doc (as a file) or have a single doc with
a list of rows?  
>  
>  
> On Wednesday, 2 April 2014 at 02:21, Ramanadham, Radhika wrote:
>  
> > I tried this before and it creates a unique document for each row in the csv file.
> >  
> > -----Original Message-----
> > From: Dave Cottlehuber [mailto:dch@jsonified.com]
> > Sent: Tuesday, April 01, 2014 5:11 PM
> > To: user@couchdb.apache.org (mailto:user@couchdb.apache.org)
> > Subject: Re: import csv data into couchdb document using  
> > python-cloudant module
> >  
> > > On Tue, Apr 1, 2014 at 9:37 PM, Ramanadham, Radhika <  
> > > radhika.ramanadham@emc.com (mailto:radhika.ramanadham@emc.com)> wrote:
> > >  
> > > > Does anyone have a code snippet to import csv data into couchdb  
> > > > document leveraging python-cloudant module?
> > > > I want to check out what's available before trying to figure it out myself.
> > > >  
> > > > Thanks for the help in advance!
> > > > -Radhika
> > >  
> >  
> >  
> >  
> >  
> > Radhika,
> >  
> > https://bitbucket.org/jagan/misc/src/84cefb61c86a/csv2couch.py might be sufficient
for your needs, although a bit dated. There’s enough info in https://cloudant.com/blog/using-python-with-cloudant/
and the newer https://github.com/cloudant-labs/cloudant-python/ to get up to speed if not.
BTW I’m not a pythoneer (pythonista? pythonian?) so that’s as far as I can help you.
> >  
> > On 01. April 2014 at 22:08:32, Benoit Chesneau (bchesneau@gmail.com (mailto:bchesneau@gmail.com))
wrote:
> > > https://github.com/refuge-incubator/rc_csv is a direct rcouch extension.
> >  
> >  
> >  
> >  
> > BTW Benoît, you might want to elaborate how this apparently unrelated code might
help the OP; as far as I can tell it doesn’t?
> >  
> > --
> > Dave Cottlehuber
> > Sent from my PDP11
>  




Mime
View raw message