Import JSON file into Couchbase using cbdocloader

走远了吗. 提交于 2019-12-06 13:58:24

Couchbase Server 4.5 treats _id in a different way: https://github.com/couchbase/couchbase-cli/blob/4.5.0/pump_json.py#L41-L62

Next version will use new docloader, which does not do it anymore. You can build it standalone: https://github.com/couchbase/docloader

export GOPATH=/tmp/gopath
mkdir -p $GOPATH
cd $GOPATH
go get github.com/couchbase/docloader/cmd/cbdocloader

It produces single static binary at

./bin/cbdocloader

Man page also located in the repository

man src/github.com/couchbase/docloader/man/man1/cbdocloader.1

You can see demo of this new docloader recorded on Connect 2016: https://www.youtube.com/watch?v=OlK9R5Fqmpo

I get the solution I have changed a condition " if '_id' not in doc: " in following file /opt/couchbase/lib/python/pump_json.py

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!