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

mongoimport fails depending on the position of Date key-values

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • 3.0.3
    • 3.0.4
    • mongoimport
    • Default mongod instance

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: