Hello!
We have about 50M records already in Json which we are looking to stuff into Couchbase in 350k batches.
because we are transforming from logfiles => json, we are using curl to try and do the bulk operations. I’ve tried googling and following examples that seemed to work for other folk, but I’ve not been able to successfully get a bulk operation using _bulk_docs
here is an example:
curl -X POST 'http://localhost:8092/default/_bulk_docs' -H 'Content-Type: application/json' -d '{"docs":[{"name":"tom"},{"name":"bob"}]}'
to which I get back
{"error":"doc_validation","reason":"User data must be in the `json` field, please nest `name`"}
I see the same thing when I copy-pasta the example in the API with the port being the exception… when i try using that port, I get no response
curl -X POST ‘http://localhost:8092/default/_bulk_docs’ -H ‘Content-Type: application/json’ -d ‘{“docs” : [{"_id" : “FishStew”,“servings” : 4,“subtitle” : “Delicious with fresh bread”,“title” : “Fish Stew”},{"_id" : “LambStew”,“servings” : 6,“subtitle” : “Delicious with scone topping”,“title” : “Lamb Stew”},{“servings” : 8,“subtitle” : “Delicious with suet dumplings”,“title” : “Beef Stew”}]}’
{“error”:“doc_validation”,“reason”:"User data must be in the json
field, please nest _id
"}
I’m wondering what I might change in my doc array to get the bulk action going or if anyone has any tips?
Thanks in advance!
Jop