Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-745

Importing CSV mongoimport forces quoted strings into other types

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.3, 3.1.2
    • Component/s: mongoimport

      (this is not new but it's very frustrating)

      Using mongoimport with CSV file where every field is quoted and therefore expected to be imported as strings, instead mongimport seems to coerce the strings into other values, in particular numbers.

      So I have fields with values "10010", "10112", "10934","94107-1745", "" and I end up with three numbers and two strings.

      This is rather unfortunate - if I wanted them as numbers, why would I have quoted them? If I import the same thing without quotes, I get numbers, so shouldn't adding quotes have some effect?

            Assignee:
            gabriel.russell@mongodb.com Gabriel Russell (Inactive)
            Reporter:
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: