-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: mongoimport
-
None
-
Environment:CentOS 5.5
It seems to me that tab-delimited fields should operate the same as comma-delimited fields, where begin and end quotes are ignored, and escaped tabs or tabs embedded within double quotes are retained correctly.
$ cat blah.tsv
1<tab>"This sentence is quoted"
2<tab>This sentence\<tab>has a tab in it
3<tab>"So does this<tab>sentence"
$ mongoimport --db blah -c blah --file blah.tsv --fields a,b --type tsv --drop -vvv
Mon Feb 21 22:47:05 creating new connection to:127.0.0.1
connected to: 127.0.0.1
Mon Feb 21 22:47:05 ns: blah.blah
dropping: blah.blah
Mon Feb 21 22:47:05 filesize: 87
Mon Feb 21 22:47:05 got line:1 "This sentence is quoted"
Mon Feb 21 22:47:05 got line:2 This sentence\ has a tab in it
Mon Feb 21 22:47:05 got line:3 "So does this sentence"
Mon Feb 21 22:47:05 got line:
imported 3 objects
$ mongo blah
MongoDB shell version: 1.6.5
connecting to: blah
> db.blah.find()
- is related to
-
SERVER-3276 mongoimport is trimming leading whitespace (including tabs) from every input record
- Closed
- links to