Hello. I am performing a lab using cbimport on my Windows desktop. I am loading a large file with many documents in it. Instead of getting multiple documents inserted into my database, it appears that the same document is overwritten multiple times. Here is the command I am using:
cbimport json -c couchbase://mymachine -u Administrator -p password -b couchmusic2 -f lines -d file://couchmusic2-userprofiles.json -t 2 -g %type%::%username%
file://couchmusic2-userprofiles.json imported to
I can’t recall the format of couchmusic2-userprofiles.json, but have you tried
-f list or
I have the same problem, did you solve this?
First I think it could be a problem with line delimitters, but I have change them with the same result of loading only 1 document.
Thanks in advance
If you are using Windows 10, you must escape % delimiters on the command line, using the ^ character, if the variable name referenced using those delimiters is also in use as a system variable name, such as username. Modify the command as:
cbimport json -c couchbase://127.0.0.1 -u Administrator -p password -b couchmusic2 -f lines -d file://couchmusic2-userprofiles.json -t 2 -g %type%::^%username^%
The training workbook has been updated to reflect this issue. Thank you for reporting it!