Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
5.5.2, 6.5.0
-
None
Description
Currently both '%' and '#' are used within cbimport to specify embedded fields or functions (such as MONO_INCR or UUID).
If you actually want to use these characters within your key, e.g. 'Airline#USA#10', you would have to escape these by using double '#' instead:
/opt/couchbase/bin/cbimport json -c couchbase://localhost -u Administrator -p password -b travel-sample -d file://output.json -f lines -g '%type%##%country%###MONO_INCR#'
|
Instead of needing to escape characters, it would be good if instead the user could specify custom delimiters to use to represent functions or fields.
An example usage would look something like below:
/opt/couchbase/bin/cbimport json -c couchbase://localhost -u Administrator -p password -b travel-sample -d file://output.json -f lines -g '%type%#%country%#$MONO_INCR$' --function-delimiter='$'
|
This not only makes the key generators more readable if you do need to use '%' or '#' in but it will probably make the parsing code simpler as you would not need to account for the cases where delimiters are escaped.
Attachments
Issue Links
For Gerrit Dashboard: MB-32621 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
103774,10 | MB-32619 MB-32621 key generator correctly escape # | master | backup | Status: MERGED | +2 | +1 |