Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
MongoImport question
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
WDB  
View profile  
 More options May 16 2012, 9:07 am
From: WDB <walter.breidenst...@thomsonreuters.com>
Date: Wed, 16 May 2012 06:07:21 -0700 (PDT)
Local: Wed, May 16 2012 9:07 am
Subject: MongoImport question
DOS files with line control characters don't seem to import. The
following error is generated for every line in the import file:

Wed May 16 08:59:45 Assertion: 10340:Failure parsing JSON string
near: }
exception:Failure parsing JSON string near: }

Removing the line control characters allows the import to work. Is
there a better way?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott Hernandez  
View profile  
 More options May 16 2012, 9:46 am
From: Scott Hernandez <scotthernan...@gmail.com>
Date: Wed, 16 May 2012 09:46:49 -0400
Local: Wed, May 16 2012 9:46 am
Subject: Re: [mongodb-user] MongoImport question

Can you post a sample to gist/pastie so we can test it?
On May 16, 2012 9:26 AM, "WDB" <walter.breidenst...@thomsonreuters.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
WDB  
View profile  
 More options May 16 2012, 9:58 am
From: WDB <walter.breidenst...@thomsonreuters.com>
Date: Wed, 16 May 2012 06:58:49 -0700 (PDT)
Local: Wed, May 16 2012 9:58 am
Subject: Re: MongoImport question
Windows 7 Professional, 64-bit
mongodb-win32-x86_64-2008plus-2.0.4

Doesn't import:
<menu id="file" value="File">
  <popup>
    <menuitem value="New" onclick="CreateNewDoc()" />
    <menuitem value="Open" onclick="OpenDoc()" />
    <menuitem value="Close" onclick="CloseDoc()" />
  </popup>
</menu>

Imports:
<menu id="file" value="File">  <popup>    <menuitem value="New"
onclick="CreateNewDoc()" />    <menuitem value="Open"
onclick="OpenDoc()" />    <menuitem value="Close"
onclick="CloseDoc()" />  </popup></menu>

Thanks for your helpl.
-WDB

On May 16, 9:46 am, Scott Hernandez <scotthernan...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nat  
View profile  
 More options May 16 2012, 10:17 am
From: Nat <nat.lu...@gmail.com>
Date: Wed, 16 May 2012 07:17:36 -0700 (PDT)
Local: Wed, May 16 2012 10:17 am
Subject: Re: MongoImport question

Your data doesn't look like JSON. Are you sure that's what you import? Also
note that mongoimport takes one document per line as an input.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
WDB  
View profile  
 More options May 16 2012, 10:24 am
From: WDB <walter.breidenst...@thomsonreuters.com>
Date: Wed, 16 May 2012 07:24:27 -0700 (PDT)
Local: Wed, May 16 2012 10:24 am
Subject: Re: MongoImport question
Oops. Yeah, that was the XML version.

This is what won't load:

{"menu": {
    "id": "file",
    "popup": {"menuitem": [
        {
            "value": "New",
            "onclick": "CreateNewDoc()"
        },
        {
            "value": "Open",
            "onclick": "OpenDoc()"
        },
        {
            "value": "Close",
            "onclick": "CloseDoc()"
        }
    ]},
    "value": "File"

}}

Mind you, NOTHING is loading for me, unless I remove the line control
chars.

Here's my line command:
mongoimport --collection bddocs --file c:\data\JSON\output
\example1.json

-WDB

On May 16, 10:17 am, Nat <nat.lu...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nat Luengnaruemitchai  
View profile  
 More options May 16 2012, 12:22 pm
From: Nat Luengnaruemitchai <nat.lu...@gmail.com>
Date: Thu, 17 May 2012 00:22:41 +0800
Local: Wed, May 16 2012 12:22 pm
Subject: Re: [mongodb-user] Re: MongoImport question

As I said, mongoimport expects one json document to be in one line (i.e. it
uses new line as document separator)

On Wed, May 16, 2012 at 10:24 PM, WDB <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
WDB  
View profile  
 More options May 16 2012, 2:13 pm
From: WDB <walter.breidenst...@thomsonreuters.com>
Date: Wed, 16 May 2012 11:13:18 -0700 (PDT)
Local: Wed, May 16 2012 2:13 pm
Subject: Re: MongoImport question
OK. I get that, now. One document, one line. And guess what? I'm fine
with that!
I'm using JSONObject from JSON.org to convert XML, and there is an
INDENT_FACTOR argument, which, when set to zero, causes no output of
line feeds. So I'm good. Thanks again for your feedback.

On May 16, 12:22 pm, Nat Luengnaruemitchai <nat.lu...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »