As i have created a data file in JSON format and I want to know how to load that JSON file to existing Couchbase Server bucket through command line or manually?
Asked
Active
Viewed 1,531 times
2 Answers
2
There is a cbimport command line tool that ships with Couchbase Server that you can use to import JSON (or CSV) data.
Here's an example that imports a JSON "lines" file into localhost and generates a UUID key
$ cbimport json -c couchbase://localhost -u myusername -p mypassword \
-b mybucket -d file:///data/myjson.json -f lines -g #UUID#

Matthew Groves
- 25,181
- 9
- 71
- 121
1
To add it manually, you can simply copy and paste the contents into the UI.
Go to Buckets -> click "Documents" next to the bucket you want -> click "Add Document" on the top right.
First, enter whatever key you want. Next, paste the JSON contents.

Matthew Groves
- 25,181
- 9
- 71
- 121