Description
cbimport imports JSON data into Couchbase. It matches cbimport json
of cbimport command which is bundled with Couchbase Enterprise edition, whereas missing in community edition.
Installation
go install github.com/narslan/cbimport
Usage
The usage is similar to cbimport-json .
Inserting documents
cbimport -c couchbase://127.0.0.1 -u Administrator -p password \
-b default -d file:///data/lines.json -f lines -g key::%name%::#MONO_INCR#
Dryrun
To see the generated keys before inserting the documents into the database, run .
cbimport -c couchbase://127.0.0.1 -u Administrator -p password \
-b default -d file:///data/list.json -f list -g key::%name% -dry
Limits / TODOs
- No threading (-t option doesn't work, yet)
- No csv supports (yet)