I am trying to insert multiple JSON documents into mongoDB with:
for (i=0; 1<1000000; i++){ mongoimport -d test -c questions TWDS1E1.txt}
TWDS1E1.txt is our JSON file held locally in C:\Program Files\MongoDB\Server\3.0\bin
But I am getting Unexpected identifier error!
I have also tried db.collections.insert( TWDS1E1.txt ) but getting TWDS1E1 is not defined error
What am I doing wrong and how can I insert multiple documents for the shell?
Mant thanks
Related
I am trying to load a json file on to my MongoDB. When I try to load it I keep getting this error....
error validating settings: incompatible options: --file and positional argument(s)
What is the problem?
I was tried exporting data from SQL Server table to .csv file and for that, I'm using the BCP utility in a batch file. My requirement is to pass database name, filename and server name as arguments.
bcp %1.dbo.temp_raw_MSPsalesrecordExtract out \\192.168.17.95\NonProdData1\CMA\ChennaiDA\Selva\%2.csv -c -t"|" -S "%3" -T
while running got an error
C:\Users\selva\Desktop\Bat>bcp.bat selva_test testfile ind-server01
The input line is too long.
The syntax of the command is incorrect.
Could anyone help me on this?
I am getting an error while importing a json document into mongoDB installed on my mac. I saw on another forum that the syntax is as follows:
mongoimport --db db1 --collection collection1 --file /Users/chummi/Desktop/zips.json
Here db1 is my database and collection1 is my collection and /Users/chummi/Desktop/zips.json is the path where the json document is present. When I run this command, am getting the following error
"SyntaxError: Unexpected identifier"
and not able to understand what this is.Please suggest if the syntax and the paths are correct?
Are you running mongoimport from inside the mongodb shell instead of the command line of your mac? Importing JSON file using mongimport, keep getting `unexpected identifier`?
When I try to dump data from my Cloud SQL database through MySQL Workspace, I get this in the log of the export process:
Error executing task: 'ascii' codec can't decode byte 0xc3 in position 60: ordinal not in range(128)
Error executing task local variable 'p1' referenced before assignment
What's causing this and how do I solve it?
EDIT: It works when dumping data from a local MySQL server, so the problem occurs only when trying to dump from Google Cloud SQL. I still don't know why it happens.
I had the same error message. The problem was, that in my local path (where I wanted to save the backup) a folder had a french character é. When saved it in another folder, then it worked
I'm trying to import data to my MySQL DB using Toad.
I'm importing the file as I always do, but suddenly I get this message:
Cannot use named and unnamed parameters in the same command.
What does this mean? I've googled, but did not get any wiser.
Here is the entire error message:
Import Started [11.07.2011 10:16:17] Processing "somefile.csv" into
"db1.table1"
Reading from file somefile.csv
Error: Cannot use named and unnamed parameters in the same command.
Error importing data, please check file format options: Cannot use named and unnamed
parameters in the same command.
Import Finished [11.07.2011 10:16:19]