MongoDB JSON File not loading - json

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?

Related

Exception handling in Bulk Copying to Amazon Redshift Using Avro files

I am trying to load avro files in S3 to a table in Redshift. one of the Avro files doesn't have a correct format. the problem is when copy command tries to load that file, it throws an exception and doesn't run the copy for correct files. how can I skip the wrong-formatted file and c
opy the correct files? here is my code for loading file:
COPY tmp.table
FROM 's3://{BUCKET}/{PREFIX}'
IAM_ROLE '{ROLE}'
FORMAT AVRO 's3://{BUCKET}/{AVRO_PATH}'
the error that I am getting is:
code: 8001
context: Cannot init avro reader from s3 file Incorrect Avro container file magic number
query: 19308992
location: avropath_request.cpp:438
process: query0_125_19308992 [pid=23925]
You can preprocess the s3://{BUCKET}/{PREFIX} files and create a manifest file with only the Avro files that have the right format/schema. Redshift can't do this for you and will try to process all files on the s3://{BUCKET}/{PREFIX} path.

importing JSON object with React

I am trying to import a .JSON file however my terminal keeps spitting out this error:
ERROR in ./src/sampleModel.json Module build failed: SyntaxError:
Unexpected token, expected ; (2:10)
I am certain there are no JSON syntax errors and for some reason it is expecting a semicolon. I am importing it like so in my project file.
import modelSchema from "sampleModel.json";
What could be causing this error?

Can't import file on Neo4j with RuntimeException error

I have updated the neo4j.conf file but can't seem to get rid of this error after changing the file and restarting. I am just trying to load a json file through neo4j and have included the line apoc.import.file.enabled=true on the neo4j.conf but doesn't seem to be working for me, I'm still getting the error message:
Failed to invoke procedure 'apoc.load.json' Caused by
java.lang.RuntimeException : Import from files not enabled, please set
apoc.import.file.enabled=true in your neo4j.conf
I am using neo4jCE 3.2.3 and have used the right file path for the json file as it previously worked on my desktop computer (I'm just trying to replicate it on my laptop) and I am using apoc 3.2.0.4 version plugin. The procedure apoc.load.json is also there when I call all procedures directory.

Importing json documents into mongodb on mac

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`?

Cannot use named and unnamed parameters in the same command

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]