Need to insert millions of json documents using cbimport


I have a requirement to insert millions of json documents into couchbase using cbimport command. I am using couchbase v6.0.1 and it is giving me error. The same cbimport works fine in v6.5.0, but my need is to use 6.0.1 only. Can some one please help here. Here are the details.

“Testdoc”: {
“applicationName”: “testapp”,
“token”: “0”,
“trackingId”: “123444444444444444444444”,
“expireTS”: 111111111111111,
“insertTS”: 111111111111,

./cbimport json --cluster http://localhost:8091 -u username -p password -b test_bucket -d file:///poc/test.json -f lines --generate-key %trackingId%

error: Key generation for document failed, field with trackingId does not exist in document

While not officially tested/supported I don’t think, I’d expect you can install the 6.5 package and us the updated cbimport against your 6.0 cluster installed on separate systems. Would that help?


That’s really very cool idea! In fact I did run the cbimport (6.5) from my local to QA( 6.0) and successfully imported the documents. THANKS FOR YOUR HELP!

1 Like