Is this possible to generate document id with all lower case letters using cbimport


#1

I am using couchbase latest 5.x and trying to import data using cbimport tool. I need to import document id with all lower case letters. But I couldn’t create, If I specify name, it will create key::Name::1.

I need key::name::1 instead of “key::Name::1.”

cbimport json -c localhost:8091 -u Administrator -p password -b name -d file:///name.json -f list --generate-key key::%name%::#MONO_INCR#

Kindly provide your inputs.


#2

Hello @ssakthi.t,

In this case cbimport is using the value of name field, so the data provided has the first letter capitalised. Unfortunately cbimport currently can’t do any transformation on the field(s) used to generated the key. I have opened MB-29336 for this feature.

In the mean time the name.json file could be preprocess to covert the name field to lower case.


#3

Ok. Thank you for your reply @pvarley!