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

mongoimport does not report that it supports the decimal type

    XMLWordPrintable

    Details

      Description

      mongoimport --help does not report that decimal is a valid type

            --columnsHaveTypes                          indicated that the field list (from --fields, --fieldsFile, or --headerline)
                                                        specifies types; They must be in the form of '<colName>.<type>(<arg>)'. The type
                                                        can be one of: auto, binary, bool, date, date_go, date_ms, date_oracle, double,
                                                        int32, int64, string. For each of the date types, the argument is a datetime
                                                        layout string. For the binary type, the argument can be one of: base32, base64,
                                                        hex. All other types take an empty argument. Only valid for CSV and TSV imports.
                                                        e.g. zipcode.string(), thumbnail.binary(base64)
      

      However, it does work if you use something like *UnitPrice.decimal()*
      And the doc rightfully lists the support for 'decimal':
      https://docs.mongodb.com/manual/reference/program/mongoimport/

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tim.fogarty Tim Fogarty
              Reporter:
              daniel.coupal Daniel Coupal
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: