incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sreedhar P V <venkatasridha...@gmail.com>
Subject Fwd: Need help for Couch DB data export
Date Thu, 21 Nov 2013 13:51:59 GMT
Hi Team,

I am using couchdb for one of my projects and need to import the client
data in couchdb. I have good experience on RDBMS but not on NoSQL. I need
your assistance for the below scenario.

To export the data I have used below curl command:
        *curl -X
GET http://127.0.0.1:5984/testdb/_all_docs?include_docs=true
<http://127.0.0.1:5984/testdb/_all_docs?include_docs=true> > FILE.txt*

To import the FILE.txt, I used _bulk_docs as below:
        *curl -d @FILE.txt -H “Content-type: application/json” -X POST *
*http://localhost:5984/testdb1/_bulk_docs*<http://localhost:5984/testdb1/_bulk_docs>


Below is the sample data for GET with _all_docs. But it is not is not
working for POST with _bulk_docs and it is expecting "docs" in the txt file.

{"total_rows":2,"offset":0,"rows":[
{"id":"docid1","key":"docid1","value":{"rev":"2-d872217c576ee407a11a5de30ce2bb30"},"doc":{"_id":"docid1","_rev":"2-d872217c576ee407a11a5de30ce2bb30","sdfs":"data"}},
{"id":"docid2","key":"docid2","value":{"rev":"1-f58d4c586789ca8e166a53ece008b23b"},"doc":{"_id":"docid2","_rev":"1-f58d4c586789ca8e166a53ece008b23b","f2":"dsvsd"}}
]}
We need to import the huge data dump which we got from client. Please guide
me to import the huge client data. Thank you in advance.



Thanks,
Sreedhar

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message