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

mongoimport fails depending on the position of Date key-values

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.0.4
    • Affects Version/s: 3.0.3
    • Component/s: mongoimport
    • Environment:
      Default mongod instance

      If the document contains a Date object and the last field is a non-Date object, mongoimport will fail.

      Attempting to import

      {"DATE": Date("1987-03-06T00:00:00.000Z"), "NUM": 560000}

      results in:

      mongoimport --db test --collection <<collection>> --file <<file>>

      2015-06-12T10:14:20.287-0700 connected to: 127.0.0.1:27017
      2015-06-12T10:14:20.288-0700 Failed: error getting extended BSON for document #0: conversion of JSON type '560000' unsupported
      2015-06-12T10:14:20.288-0700 imported 0 documents

            Assignee:
            adinoyi.omuya@mongodb.com Adinoyi Omuya
            Reporter:
            kevinl Kevin Liew
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: