Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12823

Documetation : mongoimport

    XMLWordPrintableJSON

Details

    Description

      Description

      Documentation page : https://docs.mongodb.com/manual/reference/program/mongoimport

      • Section :

      Import CSV with Specified Field Types
                     Sample :
                     Consider the following CSV data:

      Katherine Gray, 1996-02-03, F, 1235, TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ...
      Albert Gilbert, 1992-04-24, T, 13, Q3VwY2FrZSBpcHN1bSBkb2xvciBzaXQgYW1...

      should be :

      Katherine Gray, 1996-02-03, false, 1235, TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ...
      Albert Gilbert, 1992-04-24, true, 13, Q3VwY2FrZSBpcHN1bSBkb2xvciBzaXQgYW1...

      else it's don't work

      Scope of changes

      • Review the Example in question
      • Test using mongoimport 4.2, 4.0, and 3.6
        • Does setting T/F and using `<fieldName>.boolean` work? Does it have to be true/false
      • Secondary issue - we are using --columnsHaveTypes to set the rich type of the field. However, if a user looks only at --fields, there is no reference at all to setting field types. --fields should have a link to --columnsHaveTypes that includes a description of how using both options together lets users set field types for each field.
      • The example must also call out that its using --columnsHaveTypes} to set field type data.

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Activity

          People

            nathan.contino@mongodb.com Nathan Contino (Inactive)
            ftls Frederic T.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              4 years, 19 weeks, 1 day ago