cbimport is currently only an EE feature. It will be made available to CE by end of Q2 of 2019. This is the related ticket : MB-28173.
2019 or 2018? I’ve never seen a product plan that went out a year and a half! That’s pretty good planning if so.
Yes, it will be available the Summer of 2019.
I am using Couchbase CE 6.0. cbimport utility is still missing.
So much for planning a year and a half in advance!
Will it be ever shipped?
cbimport
and cbexport
will be included in Couchbase Server 6.5.0 community edition, which will be available later in the year.
If it helps anyone still facing the same problem, a workaround to this would be to use cbdocloader. Assuming all documents are stored in a single file, where each document is separated by an end of line, the way I import these documents is by first creating individual files of each one, creating the directory structure mentioned in cbdocloader’s documentation, and then using cbdocloader. An example in bash:
WDIR="/some/working/directory"
BUCKET="BUCKET_NAME"
DATAFILE="/path/to/file/containing/documents"
CBBIN="/opt/couchbase/bin"
mkdir -p $WDIR/{design_docs,docs}
cat <<-EOF>>$WDIR/design_docs/indexes.json
{
"statements": [
{
"statement": "CREATE PRIMARY INDEX on $BUCKET",
"args": null
}
]
}
EOF
cd $WDIR/docs
awk -F'[:,]' '{printf "%s\n", $0>$2".json"; close($2".json")}' $DATAFILE
cd $WDIR
$CBBIN/cbdocloader -c ... -u ... -p ... -b $BUCKET -d $WDIR -t ... -m ...
Be aware that when the number of documents is big, depending on your filesystem and operating system, creating a lot of files (as shown on the bash example) and importing them will take a lot of time, not to mention disk space.
Couchbase Server 6.5.0 community edition has been released and it contains cbimport
and cbexport
.