[SERVER-2357] mongoimport should ignore trailing commas in CSV files Created: 13/Jan/11 Updated: 12/Jul/16 Resolved: 16/Aug/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Tools |
| Affects Version/s: | 1.6.5 |
| Fix Version/s: | 1.9.2 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Victor Song | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Participants: | |||||||||||||
| Description |
|
When there are trailing commas in each line in CSV files, mongoimport creates maps "":"\r" which is useless. See an example at http://groups.google.com/group/mongodb-user/browse_thread/thread/479d90fc0d98f23b/537929bcc24fc4ce#537929bcc24fc4ce |
| Comments |
| Comment by Sridhar Nanjundeswaran [ 18/Aug/11 ] |
|
Trailing commas are not ignored. fields with empty values are created. It does not create empty fields any longer as indicated in the groups thread. Logged |
| Comment by Spencer Brody (Inactive) [ 16/Aug/11 ] |
|
This bug was fixed while fixing |
| Comment by Sidney San Martín [ 15/Mar/11 ] |
|
I agree that the current behavior is incorrect, but the CSV spec (http://tools.ietf.org/html/rfc4180) doesn't say anything about ignoring trailing commas. Is there a use case where it'd be worth going against the spec instead of just treating it as an empty value? |